radare2/shlr/java/class.c

6952 lines
238 KiB
C
Raw Normal View History

/* Apache 2.0 - Copyright 2007-2014 - pancake and dso
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
class.c rewrite: Adam Pridgen <dso@rice.edu || adam.pridgen@thecoverofnight.com>
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include "class.h"
#include <r_types.h>
#include <r_util.h>
#include <r_bin.h>
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
#include <math.h>
#include <sdb.h>
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
#ifdef IFDBG
#undef IFDBG
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
#endif
2013-12-07 22:45:55 +00:00
#define IFDBG if(0)
#define IFINT if(0)
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
static Sdb *get_sdb_bin_objs();
static int add_sdb_bin_obj(const char *key, RBinJavaObj *bin_obj);
static RBinJavaObj * get_sdb_bin_obj(const char * name);
static int del_sdb_bin_obj(const char * name);
static ut32 r_bin_java_swap_uint(ut32 x);
static ut16 r_bin_java_swap_ushort(ut16 x);
static ut32 r_bin_java_read_int(RBinJavaObj *bin, ut64 offset);
static const char * r_bin_java_get_this_class_name(RBinJavaObj *bin);
static void add_cp_objs_to_sdb( RBinJavaObj *bin);
static void add_cp_objs_to_sdb( RBinJavaObj *bin);
static void add_field_infos_to_sdb( RBinJavaObj *bin);
static void add_method_infos_to_sdb( RBinJavaObj *bin);
static char * retrieve_access_string(ut16 flags, RBinJavaAccessFlags *access_flags);
static char * retrieve_method_access_string(ut16 flags);
static char * retrieve_field_access_string(ut16 flags);
static char * retrieve_class_method_access_string(ut16 flags);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// taken from LLVM Code Byte Swap
2013-10-23 22:27:07 +00:00
// TODO: move into r_util
static ut32 r_bin_java_swap_uint(ut32 x) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 Byte0 = x & 0x000000FF;
ut32 Byte1 = x & 0x0000FF00;
ut32 Byte2 = x & 0x00FF0000;
ut32 Byte3 = x & 0xFF000000;
return (Byte0 << 24) | (Byte1 << 8) | (Byte2 >> 8) | (Byte3 >> 24);
}
static ut16 r_bin_java_swap_ushort(ut16 x) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 Byte0 = x & 0x00FF;
ut32 Byte1 = x & 0xFF00;
return (Byte0 << 8) | (Byte1 >> 8);
}
2013-10-23 22:27:07 +00:00
static ut32 r_bin_java_read_int(RBinJavaObj *bin, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 sh = 0;
r_buf_read_at (bin->b, offset, (ut8*)&sh, 4);
return r_bin_java_swap_uint (sh);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
2013-10-23 22:27:07 +00:00
static ut16 r_bin_java_read_short(RBinJavaObj *bin, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut16 sh = 0;
r_buf_read_at (bin->b, offset, (ut8*)&sh, 2);
return r_bin_java_swap_ushort (sh);
}
static ut32 r_bin_java_read_int_from_buffer(ut8 *buffer, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 sh = 0;
memcpy ((ut8 *)&sh, buffer, 4);
return r_bin_java_swap_uint (sh);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
2013-10-23 22:27:07 +00:00
static ut16 r_bin_java_read_short_from_buffer(ut8 *buffer, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut16 sh = 0;
memcpy ((ut8 *)&sh, buffer, 2);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return r_bin_java_swap_ushort (sh);
}
static ut8 R_BIN_JAVA_NULL_TYPE_INITTED = 0;
// XXX - this is a global variable used while parsing the class file
// if multi-threaded class parsing is enabled, this variable needs to
// be guarded with a lock.
static RBinJavaObj* R_BIN_JAVA_GLOBAL_BIN = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// NOTE: must be initialized for safe use
//static struct r_bin_java_cp_item_t cp_null_item = {0};
static Sdb *BIN_OBJS_ADDRS;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
static RBinJavaAccessFlags FIELD_ACCESS_FLAGS[] = {
{"public", R_BIN_JAVA_FIELD_ACC_PUBLIC},
{"private", R_BIN_JAVA_FIELD_ACC_PRIVATE},
{"protected", R_BIN_JAVA_FIELD_ACC_PROTECTED},
{"static", R_BIN_JAVA_FIELD_ACC_STATIC},
{"final", R_BIN_JAVA_FIELD_ACC_FINAL},
{"undefined.0x0020", 0x0020},
{"volatile", R_BIN_JAVA_FIELD_ACC_VOLATILE},
{"transient", R_BIN_JAVA_FIELD_ACC_TRANSIENT},
{"undefined.0x0100", 0x0100},
{"undefined.0x0200", 0x0200},
{"undefined.0x0400", 0x0400},
{"undefined.0x0800", 0x0800},
{"synthetic", R_BIN_JAVA_FIELD_ACC_SYNTHETIC},
{"undefined.0x2000", 0x2000},
{"enum", R_BIN_JAVA_FIELD_ACC_ENUM},
{"undefined.0x8000", 0x8000},
{NULL, 0}
};
static RBinJavaAccessFlags METHOD_ACCESS_FLAGS[] = {
{"public", R_BIN_JAVA_METHOD_ACC_PUBLIC},
{"private", R_BIN_JAVA_METHOD_ACC_PRIVATE},
{"protected", R_BIN_JAVA_METHOD_ACC_PROTECTED},
{"static", R_BIN_JAVA_METHOD_ACC_STATIC},
{"final", R_BIN_JAVA_METHOD_ACC_FINAL},
{"synchronized", R_BIN_JAVA_METHOD_ACC_SYNCHRONIZED},
{"bridge", R_BIN_JAVA_METHOD_ACC_BRIDGE},
{"varargs", R_BIN_JAVA_METHOD_ACC_VARARGS},
{"native", R_BIN_JAVA_METHOD_ACC_NATIVE},
{"interface", R_BIN_JAVA_METHOD_ACC_INTERFACE},
{"abstract", R_BIN_JAVA_METHOD_ACC_ABSTRACT},
{"strict", R_BIN_JAVA_METHOD_ACC_STRICT},
{"synthetic", R_BIN_JAVA_METHOD_ACC_SYNTHETIC},
{"annotation", R_BIN_JAVA_METHOD_ACC_ANNOTATION},
{"enum", R_BIN_JAVA_METHOD_ACC_ENUM},
{"undefined.0x8000", 0x8000},
{NULL, 0}
};
static RBinJavaAccessFlags CLASS_ACCESS_FLAGS[] = {
{"public", R_BIN_JAVA_CLASS_ACC_PUBLIC},
{"private", R_BIN_JAVA_CLASS_ACC_PRIVATE},
{"protected", R_BIN_JAVA_CLASS_ACC_PROTECTED},
{"static", R_BIN_JAVA_CLASS_ACC_STATIC},
{"final", R_BIN_JAVA_CLASS_ACC_FINAL},
{"synchronized", R_BIN_JAVA_CLASS_ACC_SUPER},
{"bridge", R_BIN_JAVA_CLASS_ACC_BRIDGE},
{"varargs", R_BIN_JAVA_CLASS_ACC_VARARGS},
{"native", R_BIN_JAVA_CLASS_ACC_NATIVE},
{"interface", R_BIN_JAVA_CLASS_ACC_INTERFACE},
{"abstract", R_BIN_JAVA_CLASS_ACC_ABSTRACT},
{"strict", R_BIN_JAVA_CLASS_ACC_STRICT},
{"synthetic", R_BIN_JAVA_CLASS_ACC_SYNTHETIC},
{"annotation", R_BIN_JAVA_CLASS_ACC_ANNOTATION},
{"enum", R_BIN_JAVA_CLASS_ACC_ENUM},
{"undefined.0x8000", 0x8000},
{NULL, 0}
};
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
static RBinJavaRefMetas R_BIN_JAVA_REF_METAS[] = {
{"Unknown", R_BIN_JAVA_REF_UNKNOWN},
{"GetField", R_BIN_JAVA_REF_GETFIELD},
{"GetStatic", R_BIN_JAVA_REF_GETSTATIC},
{"PutField", R_BIN_JAVA_REF_PUTFIELD},
{"PutStatic", R_BIN_JAVA_REF_PUTSTATIC},
{"InvokeVirtual", R_BIN_JAVA_REF_INVOKEVIRTUAL},
{"InvokeStatic", R_BIN_JAVA_REF_INVOKESTATIC},
{"InvokeSpecial", R_BIN_JAVA_REF_INVOKESPECIAL},
{"NewInvokeSpecial", R_BIN_JAVA_REF_NEWINVOKESPECIAL},
{"InvokeInterface", R_BIN_JAVA_REF_INVOKEINTERFACE}
};
static ut16 R_BIN_JAVA_ELEMENT_VALUE_METAS_SZ = 14;
static RBinJavaElementValueMetas R_BIN_JAVA_ELEMENT_VALUE_METAS[] = {
{"Byte", R_BIN_JAVA_EV_TAG_BYTE, NULL},
{"Char", R_BIN_JAVA_EV_TAG_CHAR, NULL},
{"Double", R_BIN_JAVA_EV_TAG_DOUBLE, NULL},
{"Float", R_BIN_JAVA_EV_TAG_FLOAT, NULL},
{"Integer", R_BIN_JAVA_EV_TAG_INT, NULL},
{"Long", R_BIN_JAVA_EV_TAG_LONG, NULL},
{"Short", R_BIN_JAVA_EV_TAG_SHORT, NULL},
{"Boolean", R_BIN_JAVA_EV_TAG_BOOLEAN, NULL},
{"Array of ", R_BIN_JAVA_EV_TAG_ARRAY, NULL},
{"String", R_BIN_JAVA_EV_TAG_STRING, NULL},
{"Enum", R_BIN_JAVA_EV_TAG_ENUM, NULL},
{"Class", R_BIN_JAVA_EV_TAG_CLASS, NULL},
{"Annotation", R_BIN_JAVA_EV_TAG_ANNOTATION, NULL},
{"Unknown", R_BIN_JAVA_EV_TAG_UNKNOWN, NULL},
};
static RBinJavaVerificationMetas R_BIN_JAVA_VERIFICATION_METAS[] = {
{"Top", R_BIN_JAVA_STACKMAP_TOP},
{"Integer", R_BIN_JAVA_STACKMAP_INTEGER},
{"Float", R_BIN_JAVA_STACKMAP_FLOAT},
{"Double", R_BIN_JAVA_STACKMAP_DOUBLE},
{"Long", R_BIN_JAVA_STACKMAP_LONG},
{"NULL", R_BIN_JAVA_STACKMAP_NULL},
{"This", R_BIN_JAVA_STACKMAP_THIS},
{"Object", R_BIN_JAVA_STACKMAP_OBJECT},
{"Uninitialized", R_BIN_JAVA_STACKMAP_UNINIT},
{"Unknown", R_BIN_JAVA_STACKMAP_UNKNOWN}
};
static RBinJavaStackMapFrameMetas R_BIN_JAVA_STACK_MAP_FRAME_METAS[] = {
{"ImplicitStackFrame", R_BIN_JAVA_STACK_FRAME_IMPLICIT, NULL},
{"Same", R_BIN_JAVA_STACK_FRAME_SAME, NULL},
{"SameLocals1StackItem", R_BIN_JAVA_STACK_FRAME_SAME_LOCALS_1, NULL},
{"Chop", R_BIN_JAVA_STACK_FRAME_CHOP, NULL},
{"SameFrameExtended", R_BIN_JAVA_STACK_FRAME_SAME_FRAME_EXTENDED, NULL},
{"Append", R_BIN_JAVA_STACK_FRAME_APPEND, NULL},
{"FullFrame", R_BIN_JAVA_STACK_FRAME_FULL_FRAME, NULL},
{"Reserved", R_BIN_JAVA_STACK_FRAME_RESERVED, NULL}
};
static RBinJavaCPTypeObjectAllocs R_BIN_ALLOCS_CONSTANTS[]= {
{r_bin_java_do_nothing_new, r_bin_java_do_nothing_free, r_bin_java_print_null_cp_summary, r_bin_java_do_nothing_calc_size, r_bin_java_print_null_cp_stringify},
{r_bin_java_utf8_cp_new, r_bin_java_utf8_info_free, r_bin_java_print_utf8_cp_summary, r_bin_java_utf8_cp_calc_size, r_bin_java_print_utf8_cp_stringify},
{r_bin_java_unknown_cp_new, r_bin_java_default_free, r_bin_java_print_unknown_cp_summary, r_bin_java_unknown_cp_calc_size, r_bin_java_print_unknown_cp_stringify},
{r_bin_java_integer_cp_new, r_bin_java_default_free, r_bin_java_print_integer_cp_summary, r_bin_java_integer_cp_calc_size, r_bin_java_print_integer_cp_stringify},
{r_bin_java_float_cp_new, r_bin_java_default_free, r_bin_java_print_float_cp_summary, r_bin_java_float_cp_calc_size, r_bin_java_print_float_cp_stringify},
{r_bin_java_long_cp_new, r_bin_java_default_free, r_bin_java_print_long_cp_summary, r_bin_java_long_cp_calc_size, r_bin_java_print_long_cp_stringify},
{r_bin_java_double_cp_new, r_bin_java_default_free, r_bin_java_print_double_cp_summary, r_bin_java_double_cp_calc_size, r_bin_java_print_double_cp_stringify},
{r_bin_java_class_cp_new, r_bin_java_default_free, r_bin_java_print_classref_cp_summary, r_bin_java_class_cp_calc_size, r_bin_java_print_classref_cp_stringify},
{r_bin_java_string_cp_new, r_bin_java_default_free, r_bin_java_print_string_cp_summary, r_bin_java_string_cp_calc_size, r_bin_java_print_string_cp_stringify},
{r_bin_java_fieldref_cp_new, r_bin_java_default_free, r_bin_java_print_fieldref_cp_summary, r_bin_java_fieldref_cp_calc_size, r_bin_java_print_fieldref_cp_stringify},
{r_bin_java_methodref_cp_new, r_bin_java_default_free, r_bin_java_print_methodref_cp_summary, r_bin_java_methodref_cp_calc_size, r_bin_java_print_methodref_cp_stringify},
{r_bin_java_interfacemethodref_cp_new, r_bin_java_default_free, r_bin_java_print_interfacemethodref_cp_summary, r_bin_java_interfacemethodref_cp_calc_size, r_bin_java_print_interfacemethodref_cp_stringify},
{r_bin_java_name_and_type_cp_new, r_bin_java_default_free, r_bin_java_print_name_and_type_cp_summary, r_bin_java_name_and_type_cp_calc_size, r_bin_java_print_name_and_type_cp_stringify},
{NULL, NULL, NULL, NULL, NULL},
{NULL, NULL, NULL, NULL, NULL},
{r_bin_java_methodhandle_cp_new, r_bin_java_default_free, r_bin_java_print_methodhandle_cp_summary, r_bin_java_methodhandle_cp_calc_size, r_bin_java_print_methodhandle_cp_stringify},
{r_bin_java_methodtype_cp_new, r_bin_java_default_free, r_bin_java_print_methodtype_cp_summary, r_bin_java_methodtype_cp_calc_size, r_bin_java_print_methodtype_cp_stringify},
{NULL, NULL, NULL, NULL, NULL},
{r_bin_java_invokedynamic_cp_new, r_bin_java_default_free, r_bin_java_print_invokedynamic_cp_summary, r_bin_java_invokedynamic_cp_calc_size, r_bin_java_print_invokedynamic_cp_stringify},
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
};
static RBinJavaCPTypeObj R_BIN_JAVA_NULL_TYPE;
static ut8 R_BIN_JAVA_CP_METAS_SZ = 12;
static RBinJavaCPTypeMetas R_BIN_JAVA_CP_METAS[] = {
// Each field has a name pointer and a tag field
{ "(null)", R_BIN_JAVA_CP_NULL, 0, &R_BIN_ALLOCS_CONSTANTS[0] },
{ "Utf8", R_BIN_JAVA_CP_UTF8, 3, &R_BIN_ALLOCS_CONSTANTS[1] }, // 2 bytes = length, N bytes string (containts a pointer in the field)
{ "Unknown", R_BIN_JAVA_CP_UNKNOWN, 0, &R_BIN_ALLOCS_CONSTANTS[2] },
{ "Integer", R_BIN_JAVA_CP_INTEGER, 5, &R_BIN_ALLOCS_CONSTANTS[3] }, // 4 bytes
{ "Float", R_BIN_JAVA_CP_FLOAT, 5, &R_BIN_ALLOCS_CONSTANTS[4] }, // 4 bytes
{ "Long", R_BIN_JAVA_CP_LONG, 9, &R_BIN_ALLOCS_CONSTANTS[5] }, // 4 high 4 low
{ "Double", R_BIN_JAVA_CP_DOUBLE, 9, &R_BIN_ALLOCS_CONSTANTS[6] }, // 4 high 4 low
{ "Class", R_BIN_JAVA_CP_CLASS, 3, &R_BIN_ALLOCS_CONSTANTS[7] }, // 2 name_idx
{ "String", R_BIN_JAVA_CP_STRING, 3, &R_BIN_ALLOCS_CONSTANTS[8] }, // 2 string_idx
{ "FieldRef", R_BIN_JAVA_CP_FIELDREF, 5, &R_BIN_ALLOCS_CONSTANTS[9] }, // 2 class idx, 2 name/type_idx
{ "MethodRef", R_BIN_JAVA_CP_METHODREF, 5, &R_BIN_ALLOCS_CONSTANTS[10] }, // 2 class idx, 2 name/type_idx
{ "InterfaceMethodRef", R_BIN_JAVA_CP_INTERFACEMETHOD_REF, 5 , &R_BIN_ALLOCS_CONSTANTS[11] }, // 2 class idx, 2 name/type_idx
{ "NameAndType", R_BIN_JAVA_CP_NAMEANDTYPE, 5, &R_BIN_ALLOCS_CONSTANTS[12] }, // 4 high 4 low
{ "Unknown", R_BIN_JAVA_CP_UNKNOWN, 0, &R_BIN_ALLOCS_CONSTANTS[2] },
{ "Unknown", R_BIN_JAVA_CP_UNKNOWN, 0, &R_BIN_ALLOCS_CONSTANTS[2] },
{ "MethodHandle", R_BIN_JAVA_CP_METHODHANDLE, 4, &R_BIN_ALLOCS_CONSTANTS[15] }, // 4 high 4 low
{ "MethodType", R_BIN_JAVA_CP_METHODTYPE, 3, &R_BIN_ALLOCS_CONSTANTS[16] }, // 4 high 4 low
{ "Unknown", R_BIN_JAVA_CP_UNKNOWN, 0, &R_BIN_ALLOCS_CONSTANTS[2] },
{ "InvokeDynamic", R_BIN_JAVA_CP_INVOKEDYNAMIC, 5, &R_BIN_ALLOCS_CONSTANTS[18] }, // 4 high 4 low
};
static RBinJavaAttrInfoObjectAllocs RBIN_JAVA_ATTRS_ALLOCS[] = {
{ r_bin_java_annotation_default_attr_new, r_bin_java_annotation_default_attr_free, r_bin_java_print_annotation_default_attr_summary, r_bin_java_annotation_default_attr_calc_size },
{ r_bin_java_bootstrap_methods_attr_new, r_bin_java_bootstrap_methods_attr_free, r_bin_java_print_bootstrap_methods_attr_summary, r_bin_java_bootstrap_methods_attr_calc_size },
{ r_bin_java_code_attr_new, r_bin_java_code_attr_free, r_bin_java_print_code_attr_summary, r_bin_java_code_attr_calc_size },
{ r_bin_java_constant_value_attr_new, r_bin_java_constant_value_attr_free, r_bin_java_print_constant_value_attr_summary, r_bin_java_constant_value_attr_calc_size},
{ r_bin_java_deprecated_attr_new, r_bin_java_deprecated_attr_free, r_bin_java_print_deprecated_attr_summary, r_bin_java_deprecated_attr_calc_size },
{ r_bin_java_enclosing_methods_attr_new, r_bin_java_enclosing_methods_attr_free, r_bin_java_print_enclosing_methods_attr_summary, r_bin_java_enclosing_methods_attr_calc_size },
{ r_bin_java_exceptions_attr_new, r_bin_java_exceptions_attr_free, r_bin_java_print_exceptions_attr_summary, r_bin_java_exceptions_attr_calc_size },
{ r_bin_java_inner_classes_attr_new, r_bin_java_inner_classes_attr_free, r_bin_java_print_inner_classes_attr_summary, r_bin_java_inner_classes_attr_calc_size },
{ r_bin_java_line_number_table_attr_new, r_bin_java_line_number_table_attr_free, r_bin_java_print_line_number_table_attr_summary, r_bin_java_line_number_table_attr_calc_size },
{ r_bin_java_local_variable_table_attr_new, r_bin_java_local_variable_table_attr_free, r_bin_java_print_local_variable_table_attr_summary, r_bin_java_local_variable_table_attr_calc_size },
{ r_bin_java_local_variable_type_table_attr_new, r_bin_java_local_variable_type_table_attr_free, r_bin_java_print_local_variable_type_table_attr_summary, r_bin_java_local_variable_type_table_attr_calc_size },
{ r_bin_java_rti_annotations_attr_new, r_bin_java_rti_annotations_attr_free, r_bin_java_print_rti_annotations_attr_summary, r_bin_java_rti_annotations_attr_calc_size },
{ r_bin_java_rtip_annotations_attr_new, r_bin_java_rtip_annotations_attr_free, r_bin_java_print_rtip_annotations_attr_summary, r_bin_java_rtip_annotations_attr_calc_size },
{ r_bin_java_rtv_annotations_attr_new, r_bin_java_rtv_annotations_attr_free, r_bin_java_print_rtv_annotations_attr_summary,r_bin_java_rtv_annotations_attr_calc_size },
{ r_bin_java_rtvp_annotations_attr_new, r_bin_java_rtvp_annotations_attr_free, r_bin_java_print_rtvp_annotations_attr_summary, r_bin_java_rtvp_annotations_attr_calc_size },
{ r_bin_java_signature_attr_new, r_bin_java_signature_attr_free, r_bin_java_print_signature_attr_summary, r_bin_java_signature_attr_calc_size },
{ r_bin_java_source_debug_attr_new, r_bin_java_source_debug_attr_free, r_bin_java_print_source_debug_attr_summary, r_bin_java_source_debug_attr_calc_size },
{ r_bin_java_source_code_file_attr_new, r_bin_java_source_code_file_attr_free, r_bin_java_print_source_code_file_attr_summary, r_bin_java_source_code_file_attr_calc_size },
{ r_bin_java_stack_map_table_attr_new, r_bin_java_stack_map_table_attr_free, r_bin_java_print_stack_map_table_attr_summary, r_bin_java_stack_map_table_attr_calc_size },
{ r_bin_java_synthetic_attr_new, r_bin_java_synthetic_attr_free, r_bin_java_print_synthetic_attr_summary, r_bin_java_synthetic_attr_calc_size },
{ r_bin_java_unknown_attr_new, r_bin_java_unknown_attr_free, r_bin_java_print_unknown_attr_summary, r_bin_java_unknown_attr_calc_size}
};
static ut32 RBIN_JAVA_ATTRS_METAS_SZ = 20;
static RBinJavaAttrMetas RBIN_JAVA_ATTRS_METAS[] = {
{ "AnnotationDefault", R_BIN_JAVA_ATTR_TYPE_ANNOTATION_DEFAULT_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[0]},
{ "BootstrapMethods", R_BIN_JAVA_ATTR_TYPE_BOOTSTRAP_METHODS_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[1]},
{ "Code", R_BIN_JAVA_ATTR_TYPE_CODE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[2]},
{ "ConstantValue", R_BIN_JAVA_ATTR_TYPE_CONST_VALUE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[3]},
{ "Deperecated", R_BIN_JAVA_ATTR_TYPE_DEPRECATED_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[4]},
{ "EnclosingMethod", R_BIN_JAVA_ATTR_TYPE_ENCLOSING_METHOD_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[5]},
{ "Exceptions", R_BIN_JAVA_ATTR_TYPE_EXCEPTIONS_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[6]},
{ "InnerClasses", R_BIN_JAVA_ATTR_TYPE_INNER_CLASSES_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[7]},
{ "LineNumberTable", R_BIN_JAVA_ATTR_TYPE_LINE_NUMBER_TABLE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[8]},
{ "LocalVariableTable", R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TABLE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[9]},
{ "LocalVariableTypeTable", R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TYPE_TABLE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[10]},
{ "RuntimeInvisibleAnnotations", R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_ANNOTATION_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[11]},
{ "RuntimeInvisibleParameterAnnotations", R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATION_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[12]},
{ "RuntimeVisibleAnnotations", R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_ANNOTATION_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[13]},
{ "RuntimeVisibleParameterAnnotations", R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_PARAMETER_ANNOTATION_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[14]},
{ "Signature", R_BIN_JAVA_ATTR_TYPE_SIGNATURE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[15]},
{ "SourceDebugExtension", R_BIN_JAVA_ATTR_TYPE_SOURCE_DEBUG_EXTENTSION_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[16]},
{ "SourceFile", R_BIN_JAVA_ATTR_TYPE_SOURCE_FILE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[17]},
{ "StackMapTable", R_BIN_JAVA_ATTR_TYPE_STACK_MAP_TABLE_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[18]},
{ "Synthetic", R_BIN_JAVA_ATTR_TYPE_SYNTHETIC_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[19]},
{ "Unknown", R_BIN_JAVA_ATTR_TYPE_UNKNOWN_ATTR, &RBIN_JAVA_ATTRS_ALLOCS[20]}
};
static const char * r_bin_java_get_this_class_name(RBinJavaObj *bin) {
RBinJavaCPTypeObj *this_class_cp_obj = r_bin_java_get_item_from_bin_cp_list(bin, bin->cf2->this_class);
return r_bin_java_get_item_name_from_bin_cp_list (bin, this_class_cp_obj);
}
2013-12-22 02:44:27 +00:00
static void add_cp_objs_to_sdb( RBinJavaObj *bin){
/*
Add Constant Pool Serialized Object to an Array
the key for this info is:
Key:
java.<classname>.cp_obj
Each Value varies by type:
In general its:
<ordinal>.<file_offset>.<type_name>.[type specific stuff]
Example:
UTF-8: <ordinal>.<file_offset>.<type_name>.<strlen>.<hexlified(str)>
Integer: <ordinal>.<file_offset>.<type_name>.<abs(int)>
Long: <ordinal>.<file_offset>.<type_name>.abs(long)>
FieldRef/MethodRef: <ordinal>.<file_offset>.<type_name>.<class_idx>.<name_and_type_idx>
*/
2013-12-22 02:44:27 +00:00
int size = 0xff;
ut32 idx = 0;
RBinJavaCPTypeObj *this_class_cp_obj = r_bin_java_get_item_from_bin_cp_list(bin, bin->cf2->this_class),
*cp_obj = NULL;
char * class_name = r_bin_java_get_item_name_from_bin_cp_list (bin, this_class_cp_obj),
* key = malloc(size),
* value = NULL;
2013-12-22 02:44:27 +00:00
if ( key == NULL) return;
2013-12-22 02:44:27 +00:00
memset(key, 0, size);
snprintf(key, size-1, "java.%s.cp_obj", class_name);
2013-12-22 02:44:27 +00:00
//sdb_alist(bin->kv, key);
for (idx = 0; idx < bin->cp_count; idx++) {
cp_obj = (RBinJavaCPTypeObj *) r_bin_java_get_item_from_bin_cp_list (bin, idx);
IFDBG eprintf("Adding %s.cp_obj.%d to the sdb.\n", class_name, cp_obj->metas->ord);
if (cp_obj) {
value = ( (RBinJavaCPTypeMetas *)
cp_obj->metas->type_info)->
allocs->stringify_obj (cp_obj);
sdb_apush (bin->kv, key, value, 0);
free (value);
}
}
free (key);
}
static void add_field_infos_to_sdb( RBinJavaObj *bin){
/*
*** Experimental and May Change ***
Add field information to an Array
the key for this info variable depenedent on addr, method ordinal, etc.
Key 1, mapping to method key:
java.<file_offset> = <field_key>
Key 3, method description
<field_key>.info = [<access str>, <class_name>, <name>, <signature>]
key 4, method meta
<field_key>.meta = [<file_offset>, ?]
*/
RListIter *iter = NULL, *iter_tmp=NULL;
RBinJavaField *fm_type;
ut32 key_size = 255,
value_buffer_size = 1024;
char * field_key = malloc (key_size),
* field_key_value = malloc (key_size),
* value_buffer = malloc (value_buffer_size);
r_list_foreach_safe (bin->fields_list, iter, iter_tmp, fm_type) {
ut32 bytes_written = 0;
ut64 field_offset = fm_type->file_offset;
// generate method specific key & value
bytes_written = snprintf (field_key, key_size, "java.0x%04"PFMT64x, field_offset);
field_key[bytes_written] = 0;
bytes_written = snprintf (field_key_value, key_size, "java.0x%04"PFMT64x".field", field_offset);
field_key_value[bytes_written] = 0;
sdb_set (bin->kv, field_key, field_key_value, 0);
// generate info key, and place values in method info array
bytes_written = snprintf (field_key, key_size, "%s.info",field_key_value);
field_key[bytes_written] = 0;
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->flags_str);
value_buffer[bytes_written] = 0;
sdb_apush (bin->kv, field_key, value_buffer, 0);
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->class_name);
value_buffer[bytes_written] = 0;
sdb_apush (bin->kv, field_key, value_buffer, 0);
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->name);
value_buffer[bytes_written] = 0;
sdb_apush (bin->kv, field_key, value_buffer, 0);
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->descriptor);
value_buffer[bytes_written] = 0;
sdb_apush (bin->kv, field_key, value_buffer, 0);
// generate info key, and place values in method info array
bytes_written = snprintf (field_key, key_size, "%s.meta",field_key_value);
field_key[bytes_written] = 0;
bytes_written = snprintf (value_buffer, value_buffer_size, "0x%04"PFMT64x, fm_type->file_offset);
value_buffer[bytes_written] = 0;
sdb_apush (bin->kv, field_key, value_buffer, 0);
}
free (field_key);
free (field_key_value);
free (value_buffer);
}
static void add_method_infos_to_sdb( RBinJavaObj *bin){
/*
*** Experimental and May Change ***
Add Mehtod information to an Array
the key for this info variable depenedent on addr, method ordinal, etc.
Key 1, mapping to method key:
java.<file_offset> = <method_key>
Key 2, basic code information
<method_key>.code = [<addr>, <size>]
Key 3, method description
<method_key>.info = [<access str>, <class_name>, <name>, <signature>,]
key 4, method meta
<method_key>.meta = [<file_offset>, ?]
// TODO in key 3 add <class_name>?
e.g. <access str>.<name>.<signature>
Note: method name not used because of collisions with operator overloading
also take note that code offset and the method offset are not the same
values.
*/
RListIter *iter = NULL, *iter_tmp=NULL;
RBinJavaField *fm_type;
ut32 key_size = 255,
value_buffer_size = 1024;
char * method_key = malloc (key_size),
* method_key_value = malloc (key_size),
* value_buffer = malloc (value_buffer_size);
r_list_foreach_safe (bin->methods_list, iter, iter_tmp, fm_type) {
ut64 code_offset = r_bin_java_get_method_code_offset (fm_type),
code_size = r_bin_java_get_method_code_size (fm_type),
method_offset = fm_type->file_offset;
ut32 bytes_written = 0;
// generate method specific key & value
bytes_written = snprintf (method_key, key_size, "java.0x%04"PFMT64x, code_offset);
method_key[bytes_written] = 0;
bytes_written = snprintf (method_key_value, key_size, "java.0x%04"PFMT64x".method", method_offset);
method_key_value[bytes_written] = 0;
IFDBG eprintf("Adding %s to sdb_array: %s\n", method_key_value, method_key);
sdb_set (bin->kv, method_key, method_key_value, 0);
// generate code key and values
bytes_written = snprintf (method_key, key_size, "%s.code",method_key_value);
method_key[bytes_written] = 0;
bytes_written = snprintf (value_buffer, value_buffer_size, "0x%04"PFMT64x, code_offset);
value_buffer[bytes_written] = 0;
sdb_apush (bin->kv, method_key, value_buffer, 0);
bytes_written = snprintf (value_buffer, value_buffer_size, "0x%04"PFMT64x, code_size);
value_buffer[bytes_written] = 0;
sdb_apush (bin->kv, method_key, value_buffer, 0);
// generate info key, and place values in method info array
bytes_written = snprintf (method_key, key_size, "%s.info", method_key_value);
method_key[bytes_written] = 0;
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->flags_str);
value_buffer[bytes_written] = 0;
IFDBG eprintf("Adding %s to sdb_array: %s\n", value_buffer, method_key);
sdb_apush (bin->kv, method_key, value_buffer, 0);
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->class_name);
value_buffer[bytes_written] = 0;
IFDBG eprintf("Adding %s to sdb_array: %s\n", value_buffer, method_key);
sdb_apush (bin->kv, method_key, value_buffer, 0);
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->name);
value_buffer[bytes_written] = 0;
IFDBG eprintf("Adding %s to sdb_array: %s\n", value_buffer, method_key);
sdb_apush (bin->kv, method_key, value_buffer, 0);
bytes_written = snprintf (value_buffer, value_buffer_size, "%s", fm_type->descriptor);
value_buffer[bytes_written] = 0;
IFDBG eprintf("Adding %s to sdb_array: %s\n", value_buffer, method_key);
sdb_apush (bin->kv, method_key, value_buffer, 0);
// generate info key, and place values in method info array
bytes_written = snprintf (method_key, key_size, "%s.meta",method_key_value);
method_key[bytes_written] = 0;
bytes_written = snprintf (value_buffer, value_buffer_size, "0x%04"PFMT64x, fm_type->file_offset);
value_buffer[bytes_written] = 0;
IFDBG eprintf("Adding %s to sdb_array: %s\n", value_buffer, method_key);
sdb_apush (bin->kv, method_key, value_buffer, 0);
}
free (method_key);
free (method_key_value);
free (value_buffer);
}
static char * retrieve_access_string(ut16 flags, RBinJavaAccessFlags *access_flags) {
char *outbuffer = NULL, *cur_pos = NULL;
ut16 i;
ut16 max_str_len = 0;
for (i = 0; access_flags[i].str != NULL; i++) {
if (flags & access_flags[i].value) {
max_str_len += (strlen (access_flags[i].str) + 1);
}
}
outbuffer = (char *) malloc (max_str_len+1);
if (outbuffer) {
memset (outbuffer, 0, max_str_len);
cur_pos = outbuffer;
for (i = 0; access_flags[i].str != NULL; i++) {
if (flags & access_flags[i].value) {
ut8 len = strlen (access_flags[i].str);
const char *the_string = access_flags[i].str;
memcpy (cur_pos, the_string, len);
memcpy (cur_pos+len, " ", 1);
cur_pos += len + 1;
}
}
*(cur_pos-1) = 0;
}
return outbuffer;
}
static char * retrieve_method_access_string(ut16 flags) {
return retrieve_access_string (flags, METHOD_ACCESS_FLAGS);
}
static char * retrieve_field_access_string(ut16 flags) {
return retrieve_access_string (flags, FIELD_ACCESS_FLAGS);
}
static char * retrieve_class_method_access_string(ut16 flags) {
return retrieve_access_string (flags, CLASS_ACCESS_FLAGS);
}
//R_API void debug_dump_all_cp_rcons_obj(RBinJavaObj * BIN_OBJ) {
// int idx = 0;
// char *cp_name = NULL;
// int ord = 0;
// RBinJavaCPTypeObj *item = NULL;
// /*
// for (idx = 1; idx < BIN_OBJ->cp_count; idx++) {
// item = (RBinJavaCPTypeObj *) r_bin_java_get_item_from_bin_cp_list (BIN_OBJ, idx);
// cp_name = ((RBinJavaCPTypeMetas *) item->metas->type_info)->name;
// ord = item->metas->ord;
// IFDBG r_cons_printf ("Found the following CP Obj: %d ord(%d) %s\n",idx, ord, cp_name);
// }*/
//}
R_API void debug_dump_all_cp_obj(RBinJavaObj * BIN_OBJ) {
int idx = 0;
char *cp_name = NULL;
int ord = 0;
RBinJavaCPTypeObj *item = NULL;
for (idx = 0; idx < BIN_OBJ->cp_count; idx++) {
item = (RBinJavaCPTypeObj *) r_bin_java_get_item_from_bin_cp_list (BIN_OBJ, idx);
cp_name = ((RBinJavaCPTypeMetas *) item->metas->type_info)->name;
ord = item->metas->ord;
IFDBG eprintf ("Found the following CP Obj: %d ord(%d) %s\n",idx, ord, cp_name);
if (item && item->tag == R_BIN_JAVA_CP_NAMEANDTYPE) {
IFDBG eprintf ("\t NameAndType name_idx: %d descriptor_idx: %d\n", item->info.cp_name_and_type.name_idx, item->info.cp_name_and_type.descriptor_idx);
}
if (item && item->tag == R_BIN_JAVA_CP_UTF8) {
IFDBG eprintf ("\t Utf8 bytes: %s\n", item->info.cp_utf8.bytes);
}
}
}
static Sdb *get_sdb_bin_objs(){
if (BIN_OBJS_ADDRS == NULL)
BIN_OBJS_ADDRS = sdb_new(NULL, 0);
return BIN_OBJS_ADDRS;
}
static int add_sdb_bin_obj(const char *key, RBinJavaObj *bin_obj) {
int result = R_FALSE;
Sdb* bin_objs_addrs = get_sdb_bin_objs ();
char addr_buf[100] = {0};
if (key && bin_obj && bin_objs_addrs) {
sdb_itoa ((ut64)bin_obj, addr_buf);
IFDBG eprintf ("Adding %s:%s to the bin_objs db\n", key, addr_buf);
sdb_set (bin_objs_addrs, key, addr_buf, 0);
result = R_TRUE;
}
return result;
}
R_API int r_bin_java_update_file (const char *key, RBinJavaObj *bin_obj) {
del_sdb_bin_obj(key);
bin_obj->file = key;
return add_sdb_bin_obj (key, bin_obj);
}
static RBinJavaObj * get_sdb_bin_obj(const char * name){
Sdb* bin_objs_addrs = get_sdb_bin_objs ();
RBinJavaObj *bin_obj = NULL;
IFDBG eprintf("Retrieving %s to the bin_objs db\n", name);
if (name && bin_objs_addrs) {
char * addr_buf = sdb_get (bin_objs_addrs, name, 0);
IFDBG eprintf("Found %s == %s bin_objs db\n", name, addr_buf);
bin_obj = (RBinJavaObj *) sdb_atoi(addr_buf);
if (addr_buf) free(addr_buf);
}
return bin_obj;
}
static int del_sdb_bin_obj(const char * name){
int result = R_FALSE;
Sdb* bin_objs_addrs = get_sdb_bin_objs ();
if (bin_objs_addrs && name && sdb_exists (bin_objs_addrs, name)) {
result = sdb_remove (bin_objs_addrs, name, 0);
}
return result;
}
R_API RBinJavaCPTypeObj* r_bin_java_get_java_null_cp() {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(R_BIN_JAVA_NULL_TYPE_INITTED)
return &R_BIN_JAVA_NULL_TYPE;
R_BIN_JAVA_NULL_TYPE_INITTED = 1;
memset (&R_BIN_JAVA_NULL_TYPE, 0, sizeof (R_BIN_JAVA_NULL_TYPE));
R_BIN_JAVA_NULL_TYPE.metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (R_BIN_JAVA_NULL_TYPE.metas == NULL)
return NULL;
memset ( R_BIN_JAVA_NULL_TYPE.metas, 0, sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
R_BIN_JAVA_NULL_TYPE.metas->type_info = &R_BIN_JAVA_CP_METAS[0];
R_BIN_JAVA_NULL_TYPE.metas->ord = 0;
R_BIN_JAVA_NULL_TYPE.file_offset = 0;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return &R_BIN_JAVA_NULL_TYPE;
}
R_API RBinJavaElementValueMetas* r_bin_java_get_ev_meta_from_tag(ut8 tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut16 i = 0;
RBinJavaElementValueMetas *result = &R_BIN_JAVA_ELEMENT_VALUE_METAS[13];
for (i = 0; i < R_BIN_JAVA_ELEMENT_VALUE_METAS_SZ; i++ ) {
if (tag == R_BIN_JAVA_ELEMENT_VALUE_METAS[i].tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
result = &R_BIN_JAVA_ELEMENT_VALUE_METAS[i];
break;
}
}
return result;
}
R_API RBinJavaCPTypeMetas* r_bin_java_get_cp_meta_from_tag(ut8 tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut16 i = 0;
// set default to unknown.
RBinJavaCPTypeMetas *result = &R_BIN_JAVA_CP_METAS[2];
for (i = 0; i < R_BIN_JAVA_CP_METAS_SZ; i++ ) {
if (tag == R_BIN_JAVA_CP_METAS[i].tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
result = &R_BIN_JAVA_CP_METAS[i];
break;
}
}
return result;
}
void deinit_java_type_null() {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (R_BIN_JAVA_NULL_TYPE.metas)
free (R_BIN_JAVA_NULL_TYPE.metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API ut8 r_bin_java_quick_check(ut8 expected_tag, ut8 actual_tag, ut32 actual_len, const char* name) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 result = 0;
if (expected_tag > R_BIN_JAVA_CP_METAS_SZ) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Invalid tag '%d' expected 0x%02x for %s.\n",actual_tag, expected_tag, name);
result = 1;
}else if (expected_tag != actual_tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Invalid tag '%d' expected 0x%02x for %s.\n",actual_tag, expected_tag, name);
result = 1;
}else if (actual_len < R_BIN_JAVA_CP_METAS[expected_tag].len) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Unable to parse '%d' expected sz=0x%02x got 0x%02x for %s.\n",
actual_tag, R_BIN_JAVA_CP_METAS[expected_tag].len, actual_len, name);
result = 2;
}
return result;
}
R_API ut64 rbin_java_raw_to_long(ut8* raw, ut64 offset) {
return RBIN_JAVA_LONG (raw, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
// yanked from careercup, because i am lazy:
// 1) dont want to figure out how make radare use math library
// 2) dont feel like figuring it out when google does it in O(1).
R_API double my_pow(double a,int b) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(b==0) return 1;
if(b==1) return a;
double temp=my_pow (a,b/2);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
temp=temp*temp;
return ((b%2==0)? temp : temp*a);
}
double rbin_java_raw_to_double(ut8* raw, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 bits = RBIN_JAVA_LONG(raw, offset);
int s = ((bits >> 63) == 0) ? 1 : -1;
int e = (int)((bits >> 52) & 0x7ffL);
long m = (e == 0) ?
(bits & 0xfffffffffffffL) << 1 :
(bits & 0xfffffffffffffL) | 0x10000000000000L;
double result = 0.0;
IFDBG printf ("Convert Long to Double: %08"PFMT64x"\n", bits);
if (0x7ff0000000000000 == bits) {
result = INFINITY;
}else if (0xfff0000000000000 == bits) {
result = -INFINITY;
}else if (0x7ff0000000000001 <= bits && bits <= 0x7fffffffffffffffL ) {
result = NAN;
}else if (0xfff0000000000001 <= bits && bits <= 0xffffffffffffffffL ) {
result = NAN;
}else{
result = s* m* my_pow (2, e-1075);//XXXX TODO Get double to work correctly here
IFDBG printf ("Convert Long to Double s: %d, m: 0x%08lx, e: 0x%08x, result: %f\n", s, m, e, result);
}
return result;
}
R_API RBinJavaField* r_bin_java_read_next_method(RBinJavaObj *bin, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaField *method;
RBinJavaAttrInfo* attr = NULL;
ut32 i, idx;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 buf[8];
RBinJavaCPTypeObj *item = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (offset == R_BUF_CUR )
offset = bin->b->cur;
method = (RBinJavaField *) R_NEW0(RBinJavaField);
method->metas = (RBinJavaMetaInfo *) R_NEW0(RBinJavaMetaInfo);
if (bin == NULL || method == NULL || method->metas == NULL) {
eprintf ("Unable to allocate memory for method or meta information\n");
if (method) free(method->metas);
free(method);
return NULL;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_buf_read_at (bin->b, offset, (ut8*)buf, 8);
method->file_offset = offset;
method->flags = R_BIN_JAVA_USHORT (buf, 0);
method->flags_str = retrieve_method_access_string (method->flags);
// need to subtract 1 for the idx
method->name_idx = R_BIN_JAVA_USHORT (buf, 2);
method->descriptor_idx = R_BIN_JAVA_USHORT (buf, 4);
method->attr_count = R_BIN_JAVA_USHORT (buf, 6);
method->attributes = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
method->type = R_BIN_JAVA_FIELD_TYPE_METHOD;
method->metas->ord = bin->method_idx;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
idx = method->name_idx;
item = r_bin_java_get_item_from_bin_cp_list (bin, idx);
method->name = r_bin_java_get_utf8_from_bin_cp_list (bin, (ut32) (method->name_idx));
IFDBG eprintf ("Method name_idx: %d, which is: ord: %d, name: %s, value: %s\n", idx, item->metas->ord, ((RBinJavaCPTypeMetas *) item->metas->type_info)->name, method->name);
if(method->name == NULL) {
method->name = (char *)malloc (21);
snprintf ((char *) method->name, 20, "sym.method_%08x", method->metas->ord);
IFDBG eprintf ("r_bin_java_read_next_method: Unable to find the name for 0x%02x index.\n", method->name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
idx = method->descriptor_idx;
item = r_bin_java_get_item_from_bin_cp_list (bin, idx);
method->descriptor = r_bin_java_get_utf8_from_bin_cp_list (bin, (ut32) method->descriptor_idx);
IFDBG eprintf ("Method descriptor_idx: %d, which is: ord: %d, name: %s, value: %s\n", idx, item->metas->ord, ((RBinJavaCPTypeMetas *) item->metas->type_info)->name, method->descriptor);
if(method->descriptor == NULL) {
method->descriptor = r_str_dup (NULL, "NULL");
IFDBG eprintf ("r_bin_java_read_next_method: Unable to find the descriptor for 0x%02x index.\n", method->descriptor_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
IFDBG eprintf ("Looking for a NameAndType CP with name_idx: %d descriptor_idx: %d\n", method->name_idx, method->descriptor_idx);
method->field_ref_cp_obj = r_bin_java_find_cp_ref_info_from_name_and_type (method->name_idx, method->descriptor_idx);
if (method->field_ref_cp_obj) {
IFDBG eprintf ("Found the obj.\n");
item = r_bin_java_get_item_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, method->field_ref_cp_obj->info.cp_method.class_idx);
IFDBG eprintf ("Method class reference value: %d, which is: ord: %d, name: %s\n", method->field_ref_cp_obj->info.cp_method.class_idx, item->metas->ord, ((RBinJavaCPTypeMetas *) item->metas->type_info)->name);
method->class_name = r_bin_java_get_item_name_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, item);
IFDBG eprintf ("Method requesting ref_cp_obj the following which is: ord: %d, name: %s\n", method->field_ref_cp_obj->metas->ord, ((RBinJavaCPTypeMetas *) method->field_ref_cp_obj->metas->type_info)->name);
IFDBG eprintf ("MethodRef class name resolves to: %s\n", method->class_name);
if (method->class_name == NULL)
method->class_name = r_str_dup (NULL, "NULL");
} else {
// XXX - default to this class?
method->field_ref_cp_obj = r_bin_java_get_item_from_bin_cp_list(bin, bin->cf2->this_class);
method->class_name = r_bin_java_get_item_name_from_bin_cp_list (bin, method->field_ref_cp_obj);
}
IFDBG printf ("Parsing %s(%s)", method->name, method->descriptor);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (method->attr_count > 0) {
for (i=0; i<method->attr_count; i++) {
attr = r_bin_java_read_next_attr (bin, bin->b->cur);
if ((r_bin_java_get_attr_type_by_name (attr->name))->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// This is necessary for determing the appropriate number of bytes when readin
// uoffset, ustack, ulocalvar values
bin->cur_method_code_length = attr->info.code_attr.code_length;
bin->offset_sz = 2;//(attr->info.code_attr.code_length > 65535) ? 4 : 2;
bin->ustack_sz = 2;// (attr->info.code_attr.max_stack > 65535) ? 4 : 2;
bin->ulocalvar_sz = 2;//(attr->info.code_attr.max_locals > 65535) ? 4 : 2;
}
r_list_append (method->attributes, attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// reset after parsing the method attributes
return method;
}
R_API RBinJavaField* r_bin_java_read_next_field(RBinJavaObj *bin, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaField *field;
RBinJavaAttrInfo* attr;
ut32 i, idx;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 buf[8];
RBinJavaCPTypeObj *item = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (offset == R_BUF_CUR )
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset = bin->b->cur;
field = (RBinJavaField *) R_NEW0(RBinJavaField);
field->metas = (RBinJavaMetaInfo *) R_NEW0(RBinJavaMetaInfo);
if (bin == NULL || field == NULL || field->metas == NULL) {
eprintf ("Unable to allocate memory for field or meta information\n");
if (field) free(field->metas);
free(field);
return NULL;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_buf_read_at (bin->b, offset, (ut8*)buf, 8);
field->file_offset = offset;
field->flags = R_BIN_JAVA_USHORT (buf, 0);
field->flags_str = retrieve_field_access_string (field->flags);
field->name_idx = R_BIN_JAVA_USHORT (buf, 2);
field->descriptor_idx = R_BIN_JAVA_USHORT (buf, 4);
field->attr_count = R_BIN_JAVA_USHORT (buf, 6);
field->attributes = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
field->type = R_BIN_JAVA_FIELD_TYPE_FIELD;
field->metas->ord = bin->field_idx;
idx = field->name_idx;
item = r_bin_java_get_item_from_bin_cp_list (bin, idx);
field->name = r_bin_java_get_utf8_from_bin_cp_list (bin, (ut32) (field->name_idx));
IFDBG eprintf ("Field name_idx: %d, which is: ord: %d, name: %s, value: %s\n", idx, item->metas->ord, ((RBinJavaCPTypeMetas *) item->metas->type_info)->name, field->name);
if(field->name == NULL) {
field->name = (char *)malloc (21);
snprintf ((char *) field->name, 20, "sym.field_%08x", field->metas->ord);
IFDBG eprintf ("r_bin_java_read_next_field: Unable to find the name for 0x%02x index.\n", field->name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
idx = field->descriptor_idx;
item = r_bin_java_get_item_from_bin_cp_list (bin, idx);
field->descriptor = r_bin_java_get_utf8_from_bin_cp_list (bin, (ut32) field->descriptor_idx);
IFDBG eprintf ("Field descriptor_idx: %d, which is: ord: %d, name: %s, value: %s\n", idx, item->metas->ord, ((RBinJavaCPTypeMetas *) item->metas->type_info)->name, field->descriptor);
if(field->descriptor == NULL) {
field->descriptor = r_str_dup (NULL, "NULL");
IFDBG eprintf ("r_bin_java_read_next_field: Unable to find the descriptor for 0x%02x index.\n", field->descriptor_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
IFDBG eprintf ("Looking for a NameAndType CP with name_idx: %d descriptor_idx: %d\n", field->name_idx, field->descriptor_idx);
field->field_ref_cp_obj = r_bin_java_find_cp_ref_info_from_name_and_type (field->name_idx, field->descriptor_idx);
if (field->field_ref_cp_obj) {
IFDBG eprintf ("Found the obj.\n");
item = r_bin_java_get_item_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, field->field_ref_cp_obj->info.cp_field.class_idx);
IFDBG eprintf ("Field class reference value: %d, which is: ord: %d, name: %s\n", field->field_ref_cp_obj->info.cp_field.class_idx, item->metas->ord, ((RBinJavaCPTypeMetas *) item->metas->type_info)->name);
field->class_name = r_bin_java_get_item_name_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, item);
IFDBG eprintf ("Field requesting ref_cp_obj the following which is: ord: %d, name: %s\n", field->field_ref_cp_obj->metas->ord, ((RBinJavaCPTypeMetas *) field->field_ref_cp_obj->metas->type_info)->name);
IFDBG eprintf ("FieldRef class name resolves to: %s\n", field->class_name);
if (field->class_name == NULL)
field->class_name = r_str_dup (NULL, "NULL");
}else {
// XXX - default to this class?
field->field_ref_cp_obj = r_bin_java_get_item_from_bin_cp_list(bin, bin->cf2->this_class);
field->class_name = r_bin_java_get_item_name_from_bin_cp_list (bin, field->field_ref_cp_obj);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG printf ("Parsing %s(%s)", field->name, field->descriptor);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (field->attr_count > 0) {
for (i=0; i< field->attr_count ; i++) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = r_bin_java_read_next_attr(bin, bin->b->cur);
if ((r_bin_java_get_attr_type_by_name(attr->name))->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) {
// This is necessary for determing the appropriate number of bytes when readin
// uoffset, ustack, ulocalvar values
bin->cur_method_code_length = attr->info.code_attr.code_length;
bin->offset_sz = 2;//(attr->info.code_attr.code_length > 65535) ? 4 : 2;
bin->ustack_sz = 2;// (attr->info.code_attr.max_stack > 65535) ? 4 : 2;
bin->ulocalvar_sz = 2;//(attr->info.code_attr.max_locals > 65535) ? 4 : 2;
}
r_list_append (field->attributes, attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
return field;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API RBinJavaCPTypeObj* r_bin_java_clone_cp_idx(RBinJavaObj *bin, ut32 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaCPTypeObj* obj = NULL;
if (bin)
obj = r_bin_java_get_item_from_bin_cp_list (bin, idx);
return r_bin_java_clone_cp_item (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API RBinJavaCPTypeObj* r_bin_java_clone_cp_item(RBinJavaCPTypeObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaCPTypeObj *clone_obj = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (obj == NULL)
return clone_obj;
clone_obj = (RBinJavaCPTypeObj*) malloc (sizeof (RBinJavaCPTypeObj));
if(clone_obj) {
memcpy (clone_obj, obj, sizeof (RBinJavaCPTypeObj));
if(obj->tag == R_BIN_JAVA_CP_UTF8) {
clone_obj->info.cp_utf8.bytes = (ut8 *) malloc (obj->info.cp_utf8.length+1);
if (clone_obj->info.cp_utf8.bytes) {
memcpy (clone_obj->info.cp_utf8.bytes, obj->info.cp_utf8.bytes, clone_obj->info.cp_utf8.length+1);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
// TODO: eprintf allocation error
}
}
}
return clone_obj;
}
R_API RBinJavaCPTypeObj* r_bin_java_read_next_constant_pool_item(RBinJavaObj *bin, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaCPTypeMetas *java_constant_info = NULL;
ut8 tag = 0;
ut64 buf_sz = 0;
ut8 *buf = NULL;
ut32 str_len = 0;
RBinJavaCPTypeObj *java_obj = NULL;
if (offset == R_BUF_CUR )
offset = bin->b->cur;
r_buf_read_at (bin->b, offset, &tag, 1);
if ( tag > R_BIN_JAVA_CP_METAS_SZ) {
eprintf ("Invalid tag '%d' at offset 0x%08"PFMT64x"\n", tag, (ut64)offset);
java_obj = r_bin_java_unknown_cp_new (bin, &tag, 1);
if (java_obj != NULL && java_obj->metas != NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
java_obj->file_offset = offset;
}
return java_obj;
}
java_constant_info = &R_BIN_JAVA_CP_METAS[tag];
if (java_constant_info->tag == 0 || java_constant_info->tag == 2 ) {
if (java_obj)
java_obj->file_offset = offset;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return java_obj;
}
buf_sz += java_constant_info->len;
if (java_constant_info->tag == 1) {
r_buf_read_at(bin->b, offset+1, (ut8 *) &str_len, sizeof (ut16));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
buf_sz += r_bin_java_swap_ushort (str_len);
}
buf = malloc (buf_sz);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (!buf)
return java_obj;
memset (buf, 0, buf_sz);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_buf_read_at(bin->b, offset, (ut8*) buf, buf_sz);
IFDBG printf ("Parsed the tag '%d':%s and create object from offset 0x%08"PFMT64x".\n",tag, R_BIN_JAVA_CP_METAS[tag].name, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
java_obj = (*java_constant_info->allocs->new_obj)(bin, buf, buf_sz);
if (java_obj != NULL && java_obj->metas != NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
java_obj->file_offset = offset;
//IFDBG printf ("java_obj->file_offset = 0x%08"PFMT64x".\n",java_obj->file_offset);
}else if(java_obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Unable to parse the tag '%d' and create valid object.\n",tag);
}else if(java_obj->metas == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Unable to parse the tag '%d' and create valid object.\n",tag);
}else{
eprintf ("Failed to set the java_obj->metas-file_offset for '%d' offset is(0x%08"PFMT64x").\n",tag, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
free (buf);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return java_obj;
}
R_API RBinJavaInterfaceInfo* r_bin_java_read_next_interface_item(RBinJavaObj *bin, ut64 offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 buf[2] = {0};
RBinJavaInterfaceInfo *interface_obj;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (offset == R_BUF_CUR )
offset = bin->b->cur;
r_buf_read_at (bin->b, offset, buf, 2);
interface_obj = r_bin_java_interface_new (bin, buf, 2);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (interface_obj)
interface_obj->file_offset = offset;
return interface_obj;
}
//static void addrow (RBinJavaObj *bin, int addr, int line) {
// int n = bin->lines.count++;
// // XXX. possible memleak
// bin->lines.addr = realloc (bin->lines.addr, sizeof (int)*n+1);
// bin->lines.addr[n] = addr;
// bin->lines.line = realloc (bin->lines.line, sizeof (int)*n+1);
// bin->lines.line[n] = line;
//}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//static struct r_bin_java_cp_item_t* r_bin_java_get_item_from_cp_CP(RBinJavaObj *bin, int i) {
// return (i<0||i>bin->cf.cp_count)? &cp_null_item: &bin->cp_items[i];
//}
2013-09-14 12:04:08 +00:00
R_API RBinJavaCPTypeObj* r_bin_java_get_item_from_cp(RBinJavaObj *bin, int i) {
if (i < 1 || i > bin->cf.cp_count )
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return &R_BIN_JAVA_NULL_TYPE;
RBinJavaCPTypeObj* obj = (RBinJavaCPTypeObj*)r_list_get_n (bin->cp_list, i);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (obj == NULL)
return &R_BIN_JAVA_NULL_TYPE;
return obj;
}
R_API char* r_bin_java_get_utf8_from_bin_cp_list (RBinJavaObj *bin, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through the Constant Pool list for the given CP Index.
If the idx not found by directly going to the list index,
the list will be walked and then the IDX will be checked.
rvalue: new char* for caller to free.
*/
if (bin == NULL)
return NULL;
return r_bin_java_get_utf8_from_cp_item_list (bin->cp_list, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char* r_bin_java_get_name_from_bin_cp_list(RBinJavaObj *bin, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through the Constant Pool list for the given CP Index.
If the idx not found by directly going to the list index,
the list will be walked and then the IDX will be checked.
rvalue: new char* for caller to free.
*/
if (bin == NULL)
return NULL;
return r_bin_java_get_name_from_cp_item_list (bin->cp_list, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char* r_bin_java_get_desc_from_bin_cp_list(RBinJavaObj *bin, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through the Constant Pool list for the given CP Index.
If the idx not found by directly going to the list index,
the list will be walked and then the IDX will be checked.
rvalue: new char* for caller to free.
*/
if (bin == NULL)
return NULL;
return r_bin_java_get_desc_from_cp_item_list (bin->cp_list, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API RBinJavaCPTypeObj* r_bin_java_get_item_from_bin_cp_list(RBinJavaObj *bin, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through the Constant Pool list for the given CP Index.
If the idx not found by directly going to the list index,
the list will be walked and then the IDX will be checked.
2013-09-14 12:04:08 +00:00
rvalue: RBinJavaObj* (user does NOT free).
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
if (bin == NULL)
return NULL;
if (idx > bin->cp_count || idx == 0)
return r_bin_java_get_java_null_cp();
return r_bin_java_get_item_from_cp_item_list (bin->cp_list, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char* r_bin_java_get_item_name_from_bin_cp_list(RBinJavaObj *bin, RBinJavaCPTypeObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Given a constant poool object Class, FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
@param cp_list: RList of RBinJavaCPTypeObj *
@param obj object to look up the name for
2013-09-14 12:04:08 +00:00
@rvalue char* (user frees) or NULL
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
if (bin == NULL)
return NULL;
return r_bin_java_get_item_name_from_cp_item_list (bin->cp_list, obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char* r_bin_java_get_item_desc_from_bin_cp_list (RBinJavaObj *bin, RBinJavaCPTypeObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Given a constant poool object Class, FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
@param cp_list: RList of RBinJavaCPTypeObj *
@param obj object to look up the name for
2013-09-14 12:04:08 +00:00
@rvalue char* (user frees) or NULL
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
if (bin == NULL)
return NULL;
return r_bin_java_get_item_desc_from_cp_item_list (bin->cp_list, obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char* r_bin_java_get_utf8_from_cp_item_list(RList *cp_list, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through the Constant Pool list for the given CP Index.
If the idx not found by directly going to the list index,
the list will be walked and then the IDX will be checked.
rvalue: new char* for caller to free.
*/
char *value = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter;
RBinJavaCPTypeObj *item = NULL;
if (cp_list == NULL)
return NULL;
item = (RBinJavaCPTypeObj *) r_list_get_n (cp_list, idx);
if (item && (item->tag == R_BIN_JAVA_CP_UTF8) && item->metas->ord == idx) {
value = r_str_dup (NULL, (const char *) item->info.cp_utf8.bytes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
if (value == NULL) {
r_list_foreach (cp_list, iter, item ) {
if (item && (item->tag == R_BIN_JAVA_CP_UTF8) && item->metas->ord == idx) {
value = r_str_dup (NULL, (const char *) item->info.cp_utf8.bytes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return value;
}
R_API RBinJavaCPTypeObj* r_bin_java_get_item_from_cp_item_list (RList *cp_list, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through the Constant Pool list for the given CP Index.
rvalue: RBinJavaObj *
*/
RBinJavaCPTypeObj *item = NULL;
if (cp_list == NULL)
return NULL;
item = (RBinJavaCPTypeObj *) r_list_get_n (cp_list, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return item;
}
R_API char* r_bin_java_get_item_name_from_cp_item_list (RList *cp_list, RBinJavaCPTypeObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Given a constant poool object Class, FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
@param cp_list: RList of RBinJavaCPTypeObj *
@param obj object to look up the name for
2013-09-14 12:04:08 +00:00
@rvalue ut8* (user frees) or NULL
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
ut32 idx = 0;
if(obj == NULL || cp_list == NULL)
return NULL;
switch(obj->tag) {
case R_BIN_JAVA_CP_NAMEANDTYPE:
return r_bin_java_get_utf8_from_cp_item_list (cp_list, obj->info.cp_name_and_type.name_idx);
case R_BIN_JAVA_CP_CLASS:
return r_bin_java_get_utf8_from_cp_item_list (cp_list, obj->info.cp_class.name_idx);
// XXX - Probably not good form, but they are the same memory structure
case R_BIN_JAVA_CP_FIELDREF:
case R_BIN_JAVA_CP_INTERFACEMETHOD_REF:
case R_BIN_JAVA_CP_METHODREF:
idx = obj->info.cp_method.name_and_type_idx;
obj = r_bin_java_get_item_from_cp_item_list (cp_list, obj->info.cp_method.name_and_type_idx);
return r_bin_java_get_item_name_from_cp_item_list (cp_list, obj);
default:
return NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API char* r_bin_java_get_name_from_cp_item_list (RList *cp_list, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Given a constant poool object Class, FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
@param cp_list: RList of RBinJavaCPTypeObj *
@param obj object to look up the name for
2013-09-14 12:04:08 +00:00
@rvalue ut8* (user frees) or NULL
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
RBinJavaCPTypeObj *obj = r_bin_java_get_item_from_cp_item_list (cp_list, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (cp_list == NULL)
return NULL;
return r_bin_java_get_item_name_from_cp_item_list (cp_list, obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char* r_bin_java_get_item_desc_from_cp_item_list (RList *cp_list, RBinJavaCPTypeObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Given a constant poool object FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
2013-09-14 12:04:08 +00:00
@rvalue ut8* (user frees) or NULL
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
ut32 idx = 0;
if(obj == NULL || cp_list == NULL)
return NULL;
switch(obj->tag) {
case R_BIN_JAVA_CP_NAMEANDTYPE:
return r_bin_java_get_utf8_from_cp_item_list (cp_list, obj->info.cp_name_and_type.descriptor_idx);
// XXX - Probably not good form, but they are the same memory structure
case R_BIN_JAVA_CP_FIELDREF:
case R_BIN_JAVA_CP_INTERFACEMETHOD_REF:
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
case R_BIN_JAVA_CP_METHODREF:
idx = obj->info.cp_method.name_and_type_idx;
obj = r_bin_java_get_item_from_cp_item_list (cp_list, obj->info.cp_method.name_and_type_idx);
return r_bin_java_get_item_desc_from_cp_item_list (cp_list, obj);
default:
return NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API char* r_bin_java_get_desc_from_cp_item_list (RList *cp_list, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Given a constant poool object FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
2013-09-14 12:04:08 +00:00
@rvalue ut8* (user frees) or NULL
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
RBinJavaCPTypeObj *obj = r_bin_java_get_item_from_cp_item_list (cp_list, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (cp_list == NULL)
return NULL;
return r_bin_java_get_item_desc_from_cp_item_list (cp_list, obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API RBinJavaAttrInfo* r_bin_java_get_method_code_attribute(const RBinJavaField *method) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through a methods attributes and return the code attr.
2013-09-14 12:04:08 +00:00
rvalue: RBinJavaAttrInfo* if found otherwise NULL.
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
RBinJavaAttrInfo *result = NULL, *attr = NULL;
RListIter *iter;
if (method) {
r_list_foreach (method->attributes, iter, attr ) {
if (attr && (attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) ) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
result = attr;
break;
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return result;
}
R_API RBinJavaAttrInfo* r_bin_java_get_attr_from_field(RBinJavaField *field, R_BIN_JAVA_ATTR_TYPE attr_type, ut32 pos ) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Search through the Attribute list for the given type starting at position pos.
rvalue: NULL or the first occurrence of attr_type after pos
*/
RBinJavaAttrInfo *attr = NULL, *item;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter;
ut32 i = 0;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (field) {
r_list_foreach (field->attributes, iter, item) {
// Note the increment happens after the comparison
if ( (i++) >= pos) {
if (item && (item->type == attr_type)) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = item;
break;
}
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return attr;
}
R_API ut8* r_bin_java_get_attr_buf(RBinJavaObj *bin, ut64 offset, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 *attr_buf = NULL;
if (offset == R_BUF_CUR)
offset = bin->b->cur;
attr_buf = (ut8 *) malloc (sz);
memset (attr_buf, 0, sz);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_buf_read_at (bin->b, offset, (ut8*)attr_buf, sz);
if (attr_buf == NULL) {
eprintf ("Unable to allocate enough bytes (0x%04"PFMT64x
") to read in the attribute.\n", sz);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr_buf;
}
return attr_buf;
}
R_API RBinJavaAttrInfo* r_bin_java_default_attr_new(ut8* buffer, ut64 sz, ut64 buf_offset) {
RBinJavaAttrInfo *attr = (RBinJavaAttrInfo *) malloc (sizeof (RBinJavaAttrInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrMetas *type_info = NULL;
ut64 offset = 0;
// read the offset now, before we make modifications or read from the buffer
memset (attr, 0, sizeof (RBinJavaAttrInfo));
attr->metas = (RBinJavaMetaInfo *)malloc (sizeof (RBinJavaMetaInfo));
if (attr->metas == NULL) {
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return NULL;
}
memset (attr->metas, 0, sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->file_offset = buf_offset;
attr->name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->size += 2;
attr->length = R_BIN_JAVA_UINT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 4;
attr->size += 4;
attr->name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, attr->name_idx);
if(attr->name == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Something bad has happened
attr->name = r_str_dup (NULL, "NULL");
eprintf ("r_bin_java_default_attr_new: Unable to find the name for %d index.\n", attr->name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
type_info = r_bin_java_get_attr_type_by_name (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->metas->ord = (R_BIN_JAVA_GLOBAL_BIN->attr_idx++);
attr->metas->type_info = (void *) type_info;
//IFDBG printf (" Addrs for type_info [tag=%d]: 0x%08"PFMT64x"\n", type_val, &attr->metas->type_info);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr;
}
RBinJavaAttrMetas* r_bin_java_get_attr_type_by_name(const char *name) {
2013-09-14 12:04:08 +00:00
RBinJavaAttrMetas* result = &RBIN_JAVA_ATTRS_METAS[R_BIN_JAVA_ATTR_TYPE_UNKNOWN_ATTR];
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
for (i = 0; i < RBIN_JAVA_ATTRS_METAS_SZ; i++) {
if (strcmp ( (const char *) name, RBIN_JAVA_ATTRS_METAS[i].name) == 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
result = &RBIN_JAVA_ATTRS_METAS[i];
break;
}
}
return result;
}
R_API RBinJavaAttrInfo* r_bin_java_read_next_attr(RBinJavaObj *bin, ut64 buf_offset) {
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 sz = 0;
ut8* buffer = NULL;
ut8 attr_idx_len = 6;
2013-09-14 12:04:08 +00:00
if (buf_offset == R_BUF_CUR)
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
buf_offset = bin->b->cur;
// ut16 attr_idx, ut32 length of attr.
sz = r_bin_java_read_int (bin, buf_offset+2) + attr_idx_len;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// when reading the attr bytes, need to also
// include the initial 6 bytes, which
// are not included in the attribute length
//,
// sz, buf_offset, buf_offset+sz);
buffer = r_bin_java_get_attr_buf (bin, buf_offset, sz);
attr = r_bin_java_read_next_attr_from_buffer (buffer, sz, buf_offset);
if (attr) {// advance the cursor to the correct place
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->b->cur = (buf_offset + sz);
IFDBG eprintf ("Advancing the cursor to 0x%d\n", bin->b->cur);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr;
}
R_API RBinJavaAttrInfo* r_bin_java_read_next_attr_from_buffer (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrInfo *attr = NULL;
ut64 offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrMetas* type_info = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (buffer) {
char* name = NULL;
ut16 name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
sz = R_BIN_JAVA_UINT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 4;
name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, name_idx);
IFDBG eprintf("r_bin_java_read_next_attr: name_idx = %d is %s\n", name_idx, name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// figure the appropriate Attributes Meta,
// get the meta
// call its from buffer
type_info = r_bin_java_get_attr_type_by_name (name);
free (name);
IFDBG eprintf ("Typeinfo: %s\n", type_info->name);
attr = type_info->allocs->new_obj (buffer, sz, buf_offset);
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->metas->ord = (R_BIN_JAVA_GLOBAL_BIN->attr_idx++);
}
}
return attr;
}
RBinJavaClass2* r_bin_java_read_class_file2(RBinJavaObj *bin, ut64 offset) {
ut8 buf[6];
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaClass2 *cf2 = (RBinJavaClass2 *) malloc (sizeof (RBinJavaClass2));
if (cf2) {
memset (cf2, 0, sizeof (RBinJavaClass2));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG printf ("\n0x%x Offset before reading the cf2 structure\n", bin->b->cur);
r_buf_read_at (bin->b, bin->b->cur, buf, 6);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/*
Reading the following fields:
ut16 access_flags;
ut16 this_class;
ut16 super_class;
*/
cf2->access_flags = R_BIN_JAVA_USHORT (buf, 0);
cf2->this_class = R_BIN_JAVA_USHORT (buf, 2);
cf2->super_class = R_BIN_JAVA_USHORT (buf, 4);
cf2->flags_str = retrieve_class_method_access_string(cf2->access_flags);
IFDBG eprintf("This class flags are: %s\n", cf2->flags_str);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("r_bin_java_read_class_file2: Unable to allocate bytes for RBinJavaClass2");
}
return cf2;
}
static int javasm_init(RBinJavaObj *bin) {
RBinJavaField *method, *field;
RBinJavaInterfaceInfo *interfaces_obj;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaCPTypeObj *obj;
int i, ord;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/* Initialize structs */
R_BIN_JAVA_GLOBAL_BIN = bin;
bin->lines.count = 0;
2013-09-14 12:04:08 +00:00
bin->cp_list = r_list_new ();
r_bin_java_get_java_null_cp ();
bin->kv = sdb_new (NULL, 0);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
/* Initialize cp_null_item */
//cp_null_item.tag = -1;
//strncpy (cp_null_item.name, "(null)", sizeof (cp_null_item.name)-1);
//cp_null_item.value = strdup ("(null)"); // strdup memleak wtf
/* start parsing */
r_buf_read_at (bin->b, bin->b->cur, (ut8*)&bin->cf, 10);
if (memcmp (bin->cf.cafebabe, "\xCA\xFE\xBA\xBE", 4)) {
eprintf ("javasm_init: Invalid header (%02x %02x %02x %02x)\n",
bin->cf.cafebabe[0], bin->cf.cafebabe[1],
bin->cf.cafebabe[2], bin->cf.cafebabe[3]);
return R_FALSE;
}
if (bin->cf.major[0]==bin->cf.major[1] && bin->cf.major[0]==0) {
eprintf ("Java CLASS with MACH0 header?\n");
return R_FALSE;
}
bin->cp_count = r_bin_java_swap_ushort (bin->cf.cp_count)-1;
IFDBG printf ("ConstantPoolCount %d\n", bin->cp_count);
bin->cp_offset = bin->b->cur;
r_list_append (bin->cp_list, r_bin_java_get_java_null_cp ());
for (ord=1,bin->cp_idx=0; bin->cp_idx < bin->cp_count; ord++, bin->cp_idx++) {
2013-09-14 12:04:08 +00:00
obj = r_bin_java_read_next_constant_pool_item (bin, bin->b->cur);
if (obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//IFDBG printf ("SUCCESS Read ConstantPoolItem %d\n", i);
obj->metas->ord = ord;
2013-09-14 12:04:08 +00:00
r_list_append (bin->cp_list, obj);
if (obj->tag == R_BIN_JAVA_CP_LONG || obj->tag == R_BIN_JAVA_CP_DOUBLE) {
//i++;
ord++;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->cp_idx++;
2013-09-14 12:04:08 +00:00
r_list_append (bin->cp_list, &R_BIN_JAVA_NULL_TYPE);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
IFDBG ((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->print_summary (obj);
2013-09-14 12:04:08 +00:00
} else {
IFDBG printf ("Failed to read ConstantPoolItem %d\n", bin->cp_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
bin->cp_size = bin->b->cur - bin->cp_offset;
bin->cf2 = r_bin_java_read_class_file2 (bin, bin->b->cur);
if (bin->cf2 == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Unable to read the class file info: bin->cf2 is NULL Failing?\n");
return R_FALSE;
}
IFDBG printf ("0x%x Access flags: 0x%04x\n", bin->b->cur, bin->cf2->access_flags);
IFDBG printf ("This class: %d\n", bin->cf2->this_class);
bin->interfaces_count = r_bin_java_read_short (bin, bin->b->cur);
bin->interfaces_list = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG printf ("Interfaces count: %d\n", bin->interfaces_count);
bin->interfaces_offset = bin->b->cur;
if ( bin->interfaces_count > 0 ) {
for (i = 0; i < bin->interfaces_count; i++) {
interfaces_obj = r_bin_java_read_next_interface_item (bin, bin->b->cur);
r_list_append (bin->interfaces_list, interfaces_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
add_cp_objs_to_sdb(bin);
bin->interfaces_size = bin->b->cur - bin->interfaces_offset;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->fields_count = r_bin_java_read_short (bin, bin->b->cur);
bin->fields_list = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->fields_offset = bin->b->cur;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG printf ("Fields count: %d\n", bin->fields_count);
if (bin->fields_count > 0) {
for (i = 0; i < bin->fields_count; i++, bin->field_idx++) {
field = r_bin_java_read_next_field (bin, bin->b->cur);
if (obj) {
r_list_append (bin->fields_list, field);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG r_bin_java_print_field_summary(field);
}else{
IFDBG printf ("Failed to read Field %d\n", i);
}
}
}
bin->fields_size = bin->b->cur - bin->fields_offset;
bin->methods_offset = bin->b->cur;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->methods_count = r_bin_java_read_short (bin,bin->b->cur);
2013-09-14 12:04:08 +00:00
bin->methods_list = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG printf ("Methods count: %d\n", bin->methods_count);
bin->main = NULL;
bin->entrypoint = NULL;
bin->main_code_attr = NULL;
bin->entrypoint_code_attr = NULL;
if (bin->methods_count > 0) {
for (i=0; i<bin->methods_count; i++, bin->method_idx++) {
method = r_bin_java_read_next_method (bin, bin->b->cur);
if (method) {
2013-09-14 12:04:08 +00:00
r_list_append (bin->methods_list, method);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
// Update Main, Init, or Class Init
if (method && !strcmp ( (const char *) method->name, "main")) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->main = method;
// get main code attr
bin->main_code_attr = r_bin_java_get_attr_from_field (method, R_BIN_JAVA_ATTR_TYPE_CODE_ATTR, 0);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
else if (method && (!strcmp ( (const char *) method->name, "<init>") || !strcmp ( (const char *) method->name, "init")) ) {
IFDBG eprintf ("FOund an init function.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->entrypoint = method;
bin->entrypoint_code_attr = r_bin_java_get_attr_from_field (method, R_BIN_JAVA_ATTR_TYPE_CODE_ATTR, 0);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
else if (method && (!strcmp ( (const char *) method->name, "<cinit>") || !strcmp ( (const char *) method->name, "cinit")) ) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->cf2->this_class_entrypoint = method;
bin->cf2->this_class_entrypoint_code_attr = r_bin_java_get_attr_from_field (method, R_BIN_JAVA_ATTR_TYPE_CODE_ATTR, 0);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
IFDBG r_bin_java_print_field_summary(method);
}
}
bin->methods_size = bin->b->cur - bin->methods_offset;
bin->attributes_offset = bin->b->cur;
bin->attributes_count = r_bin_java_read_short (bin,bin->b->cur);
if (bin->attributes_count > 0) {
for ( i=0; i<bin->attributes_count; i++,bin->attributes_idx++) {
RBinJavaAttrInfo* attr = r_bin_java_read_next_attr (bin, bin->b->cur);
if (attr)
r_list_append (bin->attributes, attr);
}
}
bin->methods_size = bin->b->cur - bin->methods_offset;
add_method_infos_to_sdb(bin);
add_field_infos_to_sdb(bin);
add_sdb_bin_obj (r_bin_java_get_this_class_name (bin), bin);
add_sdb_bin_obj (bin->file, bin);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return R_TRUE;
}
R_API char* r_bin_java_get_version(RBinJavaObj* bin) {
return r_str_newf ("0x%02x%02x 0x%02x%02x",
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->cf.major[1],bin->cf.major[0],
bin->cf.minor[1],bin->cf.minor[0]);
}
R_API ut64 r_bin_java_get_main(RBinJavaObj* bin) {
if (bin->main_code_attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return bin->main_code_attr->info.code_attr.code_offset;
}
return 0;
}
R_API RList * r_bin_java_get_entrypoints(RBinJavaObj* bin) {
RBinAddr *addr;
RListIter *iter = NULL, *iter_tmp=NULL;
RList *ret = r_list_new ();
RBinJavaField *fm_type;
if (!ret)
return NULL;
ret->free = free;
r_list_foreach_safe (bin->methods_list, iter, iter_tmp, fm_type) {
addr = R_NEW (RBinAddr);
if (addr) {
memset (addr, 0, sizeof (RBinAddr));
addr->rva = addr->offset = r_bin_java_get_method_code_offset (fm_type);;
}
r_list_append (ret, addr);
}
return ret;
}
R_API RBinJavaObj* r_bin_java_get_bin_obj(const char *name) {
return get_sdb_bin_obj (name);
}
R_API RBinJavaField * r_bin_java_get_method_code_attribute_with_addr(RBinJavaObj *bin, ut64 addr) {
RListIter *iter = NULL, *iter_tmp=NULL;
RBinJavaField *fm_type, *result = NULL;
if (bin == NULL && R_BIN_JAVA_GLOBAL_BIN) bin = R_BIN_JAVA_GLOBAL_BIN;
else {
eprintf("Attempting to analyse function when the R_BIN_JAVA_GLOBAL_BIN has not been set.\n");
return NULL;
}
r_list_foreach_safe (bin->methods_list, iter, iter_tmp, fm_type) {
ut64 offset = r_bin_java_get_method_code_offset(fm_type),
size = r_bin_java_get_method_code_size(fm_type);
if ( addr >= offset && addr <= size + offset)
result = fm_type;
}
return result;
}
R_API RBinAddr * r_bin_java_get_entrypoint(RBinJavaObj* bin, int sym) {
RBinAddr *ret = NULL;
ret = R_NEW (RBinAddr);
if (!ret)
return NULL;
switch (sym) {
case R_BIN_SYM_ENTRY:
case R_BIN_SYM_INIT:
ret->offset = r_bin_java_find_method_offset (bin, "<init>");
if(ret->offset == -1)
ret->offset = r_bin_java_find_method_offset (bin, "<cinit>");
break;
case R_BIN_SYM_FINI:
ret->offset = -1;
break;
case R_BIN_SYM_MAIN:
ret->offset = r_bin_java_find_method_offset (bin, "main");
break;
default:
ret->offset = -1;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return ret;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API ut64 r_bin_java_get_class_entrypoint(RBinJavaObj* bin) {
if (bin->cf2->this_class_entrypoint_code_attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return bin->cf2->this_class_entrypoint_code_attr->info.code_attr.code_offset;
}
return 0;
}
RBinSymbol* r_bin_java_allocate_symbol() {
RBinSymbol* t = (RBinSymbol *) malloc (sizeof (RBinSymbol));
if (t)
memset (t, 0, sizeof (RBinSymbol));
return t;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
R_API ut64 r_bin_java_get_method_code_size(RBinJavaField *fm_type) {
RListIter *attr_iter=NULL, *attr_iter_tmp=NULL;
RBinJavaAttrInfo *attr = NULL;
ut64 sz = 0;
r_list_foreach_safe (fm_type->attributes, attr_iter, attr_iter_tmp, attr) {
if (attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) {
sz = attr->info.code_attr.code_length;
break;
}
}
return sz;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
R_API ut64 r_bin_java_find_method_offset(RBinJavaObj *bin, const char* method_name) {
RListIter *attr_iter=NULL, *attr_iter_tmp=NULL;
RBinJavaField *method = NULL;
ut64 offset = -1;
r_list_foreach_safe (bin->methods_list, attr_iter, attr_iter_tmp, method) {
if(method && !strcmp ( (const char *) method->name, method_name) ) {
offset = r_bin_java_get_method_code_offset (method);
break;
}
}
return offset;
}
R_API ut64 r_bin_java_get_method_code_offset(RBinJavaField *fm_type) {
RListIter *attr_iter=NULL, *attr_iter_tmp=NULL;
RBinJavaAttrInfo *attr = NULL;
ut64 offset = 0;
r_list_foreach_safe (fm_type->attributes, attr_iter, attr_iter_tmp, attr) {
if (attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) {
offset = attr->info.code_attr.code_offset;
break;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
return offset;
}
RBinField* r_bin_java_allocate_rbinfield() {
RBinField* t = (RBinField *) malloc (sizeof (RBinField));
if (t)
memset (t, 0, sizeof (RBinField));
return t;
}
R_API RBinField* r_bin_java_create_new_rbinfield_from_field(RBinJavaField *fm_type) {
RBinField *field = r_bin_java_allocate_rbinfield ();
if (field) {
strncpy (field->name, fm_type->name, R_BIN_SIZEOF_STRINGS);
field->offset = fm_type->file_offset;
field->visibility = fm_type->flags;
}
return field;
}
R_API RBinSymbol* r_bin_java_create_new_symbol_from_field(RBinJavaField *fm_type) {
RBinSymbol *sym = r_bin_java_allocate_symbol ();
if (fm_type == NULL || fm_type->field_ref_cp_obj == NULL || fm_type->field_ref_cp_obj == &R_BIN_JAVA_NULL_TYPE) {
free (sym);
sym = NULL;
}
if (sym) {
strncpy (sym->name, fm_type->name, R_BIN_SIZEOF_STRINGS);
strncpy (sym->type, fm_type->descriptor, R_BIN_SIZEOF_STRINGS);
if (fm_type->class_name) {
sym->classname = strdup (fm_type->class_name);
} else {
sym->classname = strdup ("NONE");
}
2013-12-13 18:20:18 +00:00
sym->offset = r_bin_java_get_method_code_offset (fm_type);
sym->rva = r_bin_java_get_method_code_offset (fm_type);
sym->ordinal = fm_type->metas->ord;
sym->size = r_bin_java_get_method_code_size (fm_type);
sym->visibility = fm_type->flags;
if (fm_type->flags_str){
strncpy (sym->visibility_str, fm_type->flags_str, R_BIN_SIZEOF_STRINGS);
}
}
return sym;
}
R_API RBinSymbol* r_bin_java_create_new_symbol_from_ref(RBinJavaCPTypeObj *obj) {
RBinSymbol *sym = r_bin_java_allocate_symbol ();
char *class_name, *name, *type_name;
if (obj == NULL || (obj->tag != R_BIN_JAVA_CP_METHODREF &&
obj->tag != R_BIN_JAVA_CP_INTERFACEMETHOD_REF &&
obj->tag != R_BIN_JAVA_CP_FIELDREF) ) {
if (sym)
free (sym);
sym = NULL;
return sym;
}
if (sym) {
class_name = r_bin_java_get_name_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN,
obj->info.cp_method.class_idx);
name = r_bin_java_get_name_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN,
obj->info.cp_method.name_and_type_idx);
type_name = r_bin_java_get_name_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN,
obj->info.cp_method.name_and_type_idx);
if (name) {
strncpy (sym->name, name, R_BIN_SIZEOF_STRINGS);
free (name);
name = NULL;
}
if (type_name) {
strncpy (sym->type, type_name, R_BIN_SIZEOF_STRINGS);
free (type_name);
type_name = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
if (class_name)
sym->classname = class_name;
sym->offset = obj->file_offset;
sym->rva = obj->file_offset;
sym->ordinal = obj->metas->ord;
sym->size = 0;
}
return sym;
}
R_API RBinSection* r_bin_java_allocate_section() {
RBinSection* section = (RBinSection *) malloc (sizeof (RBinSection));
if(section)
memset (section, 0, sizeof (RBinSection));
return section;
}
R_API RList* r_bin_java_get_sections(RBinJavaObj *bin) {
2013-09-14 12:04:08 +00:00
RBinSection* section = NULL;
RList *sections = r_list_new ();
if (bin->cp_count > 0) {
section = r_bin_java_allocate_section ();
if(section) {
strcpy (section->name, "constant_pool");
section->size = bin->cp_size;
section->offset = bin->cp_offset;
section->srwx = 0;
r_list_append (sections, section);
}
section = NULL;
}
if (bin->fields_count > 0) {
section = r_bin_java_allocate_section ();
if(section) {
strcpy (section->name, "fields");
section->size = bin->fields_size;
section->offset = bin->fields_offset;
section->srwx = 0;
r_list_append (sections, section);
}
section = NULL;
}
if (bin->methods_count > 0) {
section = r_bin_java_allocate_section ();
if(section) {
strcpy (section->name, "methods");
section->size = bin->methods_size;
section->offset = bin->methods_offset;
section->srwx = 0;
r_list_append (sections, section);
}
section = NULL;
}
if (bin->interfaces_count > 0) {
section = r_bin_java_allocate_section ();
if(section) {
strcpy (section->name, "interfaces");
section->size = bin->interfaces_size;
section->offset = bin->interfaces_offset;
section->srwx = 0;
r_list_append (sections, section);
}
section = NULL;
}
if (bin->attributes_count > 0) {
section = r_bin_java_allocate_section ();
if(section) {
strcpy (section->name, "attributes");
section->size = bin->attributes_size;
section->offset = bin->attributes_offset;
r_list_append (sections, section);
}
section = NULL;
}
return sections;
}
R_API RList* r_bin_java_enum_class_methods(RBinJavaObj *bin, ut16 class_idx) {
2013-09-14 12:04:08 +00:00
RList* methods = r_list_new ();
RListIter *iter;
RBinJavaField *fm_type;
RBinSymbol *sym = NULL;
2013-09-14 12:04:08 +00:00
r_list_foreach (bin->methods_list, iter, fm_type) {
if (fm_type && fm_type->field_ref_cp_obj && \
fm_type->field_ref_cp_obj->metas->ord == class_idx) {
sym = r_bin_java_create_new_symbol_from_ref (
fm_type->field_ref_cp_obj);
if (sym) r_list_append (methods, sym);
}
}
return methods;
}
R_API RList* r_bin_java_enum_class_fields(RBinJavaObj *bin, ut16 class_idx) {
RList* fields = r_list_new ();
RListIter *iter, *iter_tmp;
RBinJavaField *fm_type;
RBinField *field = NULL;
r_list_foreach_safe (bin->fields_list, iter, iter_tmp, fm_type) {
2013-09-14 12:04:08 +00:00
if (fm_type) {
if (fm_type && fm_type->field_ref_cp_obj
&& fm_type->field_ref_cp_obj->metas->ord == class_idx) {
field = r_bin_java_create_new_rbinfield_from_field (fm_type);
if (field) r_list_append (fields, field);
}
}
}
return fields;
}
static int is_class_interface(RBinJavaObj *bin, RBinJavaCPTypeObj *cp_obj) {
RListIter *iter;
RBinJavaInterfaceInfo *interface_obj;
int result = R_FALSE;
r_list_foreach(bin->interfaces_list, iter, interface_obj) {
if (interface_obj) {
result = cp_obj == interface_obj->cp_class;
if (result) break;
}
}
return result;
}
/*
R_API RList * r_bin_java_get_interface_classes(RBinJavaObj * bin) {
RList *interfaces_names = r_list_new();
RListIter *iter;
RBinJavaInterfaceInfo *interface_obj;
r_list_foreach(bin->interfaces_list, iter, iinfo) {
RBinClass *class_ = R_NEW0 (RBinClass);
RBinJavaCPTypeObj *cp_obj = ;
if (interface_obj && interface_obj->name) {
ut8 * name = strdup(interface_obj->name);
r_list_append(interfaces_names, name);
}
}
return interfaces_names;
}
*/
R_API RList * r_bin_java_get_interface_names(RBinJavaObj * bin) {
RList *interfaces_names = r_list_new();
RListIter *iter;
RBinJavaInterfaceInfo *interface_obj;
r_list_foreach(bin->interfaces_list, iter, interface_obj) {
if (interface_obj && interface_obj->name) {
char* name = strdup (interface_obj->name);
r_list_append (interfaces_names, name);
}
}
return interfaces_names;
}
R_API RList * r_bin_java_get_lib_names(RBinJavaObj * bin) {
RList *lib_names = r_list_new();
RListIter *iter;
RBinJavaCPTypeObj *cp_obj = NULL;
r_list_foreach (bin->cp_list, iter, cp_obj) {
if (cp_obj &&
cp_obj->tag == R_BIN_JAVA_CP_CLASS &&
(bin->cf2->this_class != cp_obj->info.cp_class.name_idx || !is_class_interface(bin, cp_obj) )) {
char * name = r_bin_java_get_item_name_from_bin_cp_list (bin, cp_obj);
r_list_append (lib_names, name);
}
}
return lib_names;
}
R_API RList* r_bin_java_get_classes(RBinJavaObj *bin) {
2013-09-14 12:04:08 +00:00
RList *classes = r_list_new ();
RListIter *iter, *iter_tmp;
RBinJavaCPTypeObj *cp_obj = NULL,
*this_class_cp_obj = r_bin_java_get_item_from_bin_cp_list(bin, bin->cf2->this_class);
ut32 idx = 0;
RBinClass *class_;
class_ = R_NEW0 (RBinClass);
class_->visibility = bin->cf2->access_flags;
if (bin->cf2->flags_str) {
class_->visibility_str = strdup(bin->cf2->flags_str);
}
class_->methods = r_bin_java_enum_class_methods (bin, bin->cf2->this_class);
class_->fields = r_bin_java_enum_class_fields (bin, bin->cf2->this_class);
class_->name = r_bin_java_get_item_name_from_bin_cp_list (bin, this_class_cp_obj);
class_->super = r_bin_java_get_name_from_bin_cp_list (bin, bin->cf2->super_class);
class_->index = (idx++);
2013-09-14 12:04:08 +00:00
r_list_append (classes, class_);
r_list_foreach_safe (bin->cp_list, iter, iter_tmp, cp_obj) {
if (cp_obj &&
cp_obj->tag == R_BIN_JAVA_CP_CLASS &&
(this_class_cp_obj != cp_obj && is_class_interface (bin, cp_obj) )) {
class_ = R_NEW0 (RBinClass);
class_->methods = r_bin_java_enum_class_methods (bin, cp_obj->info.cp_class.name_idx);
class_->fields = r_bin_java_enum_class_fields (bin, cp_obj->info.cp_class.name_idx);
class_->index = idx;
class_->name = r_bin_java_get_item_name_from_bin_cp_list (bin, cp_obj);
r_list_append (classes, class_);
idx++;
}
}
return classes;
}
R_API RBinSymbol* r_bin_java_create_new_symbol_from_invoke_dynamic(RBinJavaCPTypeObj *obj) {
RBinSymbol *sym = NULL;
2013-09-14 12:04:08 +00:00
if (obj == NULL || (obj->tag != R_BIN_JAVA_CP_INVOKEDYNAMIC))
return sym;
return r_bin_java_create_new_symbol_from_cp_idx (obj->info.cp_invoke_dynamic.name_and_type_index);
}
R_API RBinSymbol* r_bin_java_create_new_symbol_from_cp_idx (ut32 cp_idx) {
RBinSymbol *sym = NULL;
2013-09-14 12:04:08 +00:00
RBinJavaCPTypeObj *obj = r_bin_java_get_item_from_bin_cp_list (
R_BIN_JAVA_GLOBAL_BIN, cp_idx);
if (obj) switch (obj->tag) {
case R_BIN_JAVA_CP_METHODREF:
case R_BIN_JAVA_CP_FIELDREF:
case R_BIN_JAVA_CP_INTERFACEMETHOD_REF:
sym = r_bin_java_create_new_symbol_from_ref (obj);
break;
case R_BIN_JAVA_CP_INVOKEDYNAMIC:
sym = r_bin_java_create_new_symbol_from_invoke_dynamic (obj);
break;
default:
break;
}
return sym;
}
2013-09-14 12:04:08 +00:00
RList* r_bin_java_get_fields(RBinJavaObj* bin) {
RListIter *iter = NULL, *iter_tmp=NULL;
RList *fields = r_list_new ();
RBinField *field;
RBinJavaField *fm_type;
r_list_foreach_safe (bin->fields_list, iter, iter_tmp, fm_type) {
field = r_bin_java_create_new_rbinfield_from_field (fm_type);
if(field) {
r_list_append (fields, field);
}
}
return fields;
}
R_API const RList* r_bin_java_get_methods_list(RBinJavaObj* bin) {
if (bin) {
return bin->methods_list;
} else if ( R_BIN_JAVA_GLOBAL_BIN) {
return R_BIN_JAVA_GLOBAL_BIN->methods_list;
}
return NULL;
}
2013-09-14 12:04:08 +00:00
RList* r_bin_java_get_symbols(RBinJavaObj* bin) {
RListIter *iter = NULL, *iter_tmp=NULL;
RList *symbols = r_list_new ();
RBinSymbol *sym;
RBinJavaField *fm_type;
sym = NULL;
r_list_foreach_safe (bin->methods_list, iter, iter_tmp, fm_type) {
sym = r_bin_java_create_new_symbol_from_field (fm_type);
if(sym) {
r_list_append (symbols, (void *) sym);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
return symbols;
}
2013-09-14 12:04:08 +00:00
R_API RList* r_bin_java_get_strings(RBinJavaObj* bin) {
RList *strings = r_list_new ();
RBinString *str = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp=NULL;
RBinJavaCPTypeObj *cp_obj = NULL;
r_list_foreach_safe (bin->cp_list, iter, iter_tmp, cp_obj) {
if (cp_obj && cp_obj->tag == R_BIN_JAVA_CP_UTF8) {
str = (RBinString *) R_NEW0(RBinString);
if(str) {
str->offset = cp_obj->file_offset;
str->ordinal = cp_obj->metas->ord;
str->size = cp_obj->info.cp_utf8.length;
strncpy ((char *) str->string, (const char *) cp_obj->info.cp_utf8.bytes, R_BIN_JAVA_MAXSTR);
r_list_append (strings, (void *) str);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
return strings;
}
R_API void* r_bin_java_free (RBinJavaObj* bin) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (!bin) return NULL;
// XXX - need to free all keys and values
sdb_free (bin->kv);
del_sdb_bin_obj (r_bin_java_get_this_class_name (bin));
del_sdb_bin_obj (bin->file);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// free up the constant pool list
r_bin_java_constant_pool_list_free (bin);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// free up the fields list
r_bin_java_fields_list_free (bin);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// free up methods list
r_bin_java_methods_list_free (bin);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// free up interfaces list
r_bin_java_interfaces_list_free (bin);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO: XXX if a class list of all inner classes
// are formed then this will need to be updated
if (bin->b) r_buf_free (bin->b);
if (bin->cf2) {
free (bin->cf2->flags_str);
free (bin->cf2);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->b = NULL;
R_BIN_JAVA_GLOBAL_BIN = NULL;
free (bin);
return NULL;
}
R_API RBinJavaObj* r_bin_java_new (const char* file) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 *buf;
RBinJavaObj *bin = R_NEW0 (RBinJavaObj);
bin->file = file;
if (!(buf = (ut8*)r_file_slurp (file, &bin->size)))
return r_bin_java_free (bin);
bin->b = r_buf_new ();
if (!r_buf_set_bytes (bin->b, buf, bin->size))
return r_bin_java_free (bin);
free (buf);
if (!javasm_init (bin))
return r_bin_java_free (bin);
return bin;
}
R_API RBinJavaObj* r_bin_java_new_buf(RBuffer *buf) {
RBinJavaObj *bin = R_NEW0 (RBinJavaObj);
if (!bin) return NULL;
bin->b = buf;
bin->size = buf->length;
buf->cur = 0; // rewind
if (!javasm_init (bin))
return r_bin_java_free (bin);
return bin;
}
R_API void r_bin_java_free_attribute_list (RList *attributes) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrInfo* attr = NULL;
RListIter *attr_iter, *attr_iter_tmp = NULL;
if(attributes) {
r_list_foreach_safe (attributes, attr_iter, attr_iter_tmp, attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Note the attr->type_info->delete_obj will free the attribute object
((RBinJavaAttrMetas *) attr->metas->type_info)->allocs->delete_obj (attr);
r_list_delete (attributes, attr_iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attributes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attributes = NULL;
}
R_API void r_bin_java_constant_pool_list_free (RBinJavaObj* bin) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaCPTypeObj *obj = NULL;
if (bin->cp_list) {
r_list_foreach_safe (bin->cp_list, iter, iter_tmp, obj) {
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
r_list_delete (bin->cp_list, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (bin->cp_list);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bin->cp_list = NULL;
}
}
R_API void r_bin_java_methods_list_free (RBinJavaObj* bin) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaField* method = NULL;
RListIter *iter=NULL, *iter_tmp = NULL;
if(bin->methods_list) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (bin->methods_list, iter, iter_tmp, method) {
free (method->descriptor);
free (method->name);
free (method->flags_str);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (method->attributes) {
r_bin_java_free_attribute_list (method->attributes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
method->attributes = NULL;
free (method);
r_list_delete (bin->methods_list, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (bin->methods_list);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
bin->methods_list = NULL;
}
R_API void r_bin_java_interfaces_list_free (RBinJavaObj* bin) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaInterfaceInfo* obj = NULL;
RListIter *iter=NULL, *iter_tmp = NULL;
if(bin->interfaces_list) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (bin->interfaces_list, iter, iter_tmp, obj) {
r_bin_java_interface_free (obj);
r_list_delete (bin->interfaces_list, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (bin->interfaces_list);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
bin->interfaces_list = NULL;
}
R_API void r_bin_java_fields_list_free (RBinJavaObj* bin) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaField* field = NULL;
RListIter *iter=NULL, *iter_tmp = NULL;
if(bin->fields_list) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (bin->fields_list, iter, iter_tmp, field) {
free (field->descriptor);
free (field->name);
free (field->flags_str);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (field->attributes) {
r_bin_java_free_attribute_list (field->attributes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
field->attributes = NULL;
free (field);
r_list_delete (bin->fields_list, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (bin->fields_list);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
bin->fields_list = NULL;
}
// Start Free the various attribute types
R_API void r_bin_java_unknown_attr_free (RBinJavaAttrInfo *attr) {
if(attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_local_variable_table_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLocalVariableAttribute* lvattr = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TABLE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.local_variable_table_attr.local_variable_table) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (attr->info.local_variable_table_attr.local_variable_table, iter, iter_tmp, lvattr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (lvattr->descriptor)
free (lvattr->descriptor);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (lvattr->name)
free (lvattr->name);
free (lvattr);
r_list_delete (attr->info.local_variable_table_attr.local_variable_table, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.local_variable_table_attr.local_variable_table);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->info.local_variable_table_attr.local_variable_table = NULL;
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_local_variable_type_table_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLocalVariableTypeAttribute* lvtattr = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TYPE_TABLE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.local_variable_type_table_attr.local_variable_table) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (attr->info.local_variable_type_table_attr.local_variable_table, iter, iter_tmp, lvtattr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (lvtattr->name)
free (lvtattr->name);
if (lvtattr->signature)
free (lvtattr->signature);
free (lvtattr);
r_list_delete (attr->info.local_variable_type_table_attr.local_variable_table, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.local_variable_type_table_attr.local_variable_table);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->info.local_variable_type_table_attr.local_variable_table = NULL;
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_deprecated_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_DEPRECATED_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_enclosing_methods_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_ENCLOSING_METHOD_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.enclosing_method_attr.class_name) {
free (attr->info.enclosing_method_attr.class_name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
if (attr->info.enclosing_method_attr.method_name) {
free (attr->info.enclosing_method_attr.method_name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
if (attr->info.enclosing_method_attr.method_descriptor) {
free (attr->info.enclosing_method_attr.method_descriptor);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_synthetic_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_SYNTHETIC_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_constant_value_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_CONST_VALUE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_line_number_table_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLineNumberAttribute *lnattr;
RListIter *iter = NULL, *iter_tmp = NULL;
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_LINE_NUMBER_TABLE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.line_number_table_attr.line_number_table) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (attr->info.line_number_table_attr.line_number_table, iter, iter_tmp, lnattr) {
free (lnattr);
r_list_delete (attr->info.line_number_table_attr.line_number_table, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.line_number_table_attr.line_number_table);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->info.line_number_table_attr.line_number_table = NULL;
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_code_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaExceptionEntry *exc_entry = NULL;
RBinJavaAttrInfo *_attr;
RListIter *iter = NULL, *iter_tmp = NULL;
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.code_attr.implicit_frame)
r_bin_java_stack_frame_free (attr->info.code_attr.implicit_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->info.code_attr.exception_table) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (attr->info.code_attr.exception_table, iter, iter_tmp, exc_entry) {
free (exc_entry);
r_list_delete (attr->info.code_attr.exception_table, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.code_attr.exception_table);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->info.code_attr.exception_table = NULL;
// Delete the exception_table entries
if(attr->info.code_attr.attributes) {
r_list_foreach_safe (attr->info.code_attr.attributes, iter, iter_tmp, _attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(_attr->metas->type_info)
((RBinJavaAttrMetas *) _attr->metas->type_info)->allocs->delete_obj (_attr);
r_list_delete (attr->info.code_attr.attributes, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.code_attr.attributes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->info.code_attr.attributes = NULL;
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_exceptions_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_EXCEPTIONS_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.exceptions_attr.exception_idx_table)
free (attr->info.exceptions_attr.exception_idx_table);
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_inner_classes_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaClassesAttribute *icattr;
RListIter *iter, *iter_tmp=NULL;
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_INNER_CLASSES_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
if(attr->info.inner_classes_attr.classes) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the classes entries
r_list_foreach_safe (attr->info.inner_classes_attr.classes, iter, iter_tmp, icattr) {
if(icattr) {
free (icattr->name);
free (icattr->flags_str);
free (icattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_delete (attr->info.inner_classes_attr.classes, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.inner_classes_attr.classes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->info.inner_classes_attr.classes = NULL;
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_signature_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_SIGNATURE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.signature_attr.signature)
free (attr->info.signature_attr.signature);
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_source_debug_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_SOURCE_DEBUG_EXTENTSION_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.debug_extensions.debug_extension)
free (attr->info.debug_extensions.debug_extension);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->info.debug_extensions.debug_extension = NULL;
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_source_code_file_attr_free (RBinJavaAttrInfo *attr) {
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_SOURCE_FILE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_stack_map_table_attr_free (RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RList* ptrList = NULL;
RBinJavaStackMapFrame *frame = NULL;
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_STACK_MAP_TABLE_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(attr->name)
free (attr->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->metas)
free (attr->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ptrList = attr->info.stack_map_table_attr.stack_map_frame_entries;
if(ptrList) {
r_list_foreach_safe (ptrList, iter, iter_tmp, frame) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (frame)
r_bin_java_stack_frame_free (frame);
r_list_delete (ptrList, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (ptrList);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ptrList = NULL;
attr->info.stack_map_table_attr.stack_map_frame_entries = NULL;
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_stack_frame_free (RBinJavaStackMapFrame* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RList* ptrList = NULL;
RBinJavaVerificationObj *ver_obj = NULL;
if (obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ptrList = obj->local_items;
if (obj->metas) {
free (obj->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas = NULL;
}
if(ptrList) {
r_list_foreach_safe (ptrList, iter, iter_tmp, ver_obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (ver_obj)
r_bin_java_verification_info_free (ver_obj);
r_list_delete (ptrList, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (ptrList);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
obj->local_items = NULL;
ptrList = obj->stack_items;
if(ptrList) {
r_list_foreach_safe (ptrList, iter, iter_tmp, ver_obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (ver_obj)
r_bin_java_verification_info_free (ver_obj);
r_list_delete (ptrList, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (ptrList);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
obj->stack_items = NULL;
ptrList = NULL;
free (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_verification_info_free (RBinJavaVerificationObj* obj) {
if(obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (obj->name)
free (obj->name);
free (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_interface_free (RBinJavaInterfaceInfo *obj) {
2013-09-14 12:04:08 +00:00
if (obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (obj->name)
free (obj->name);
free (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
// End Free the various attribute types
// Start the various attibute types new
R_API ut64 r_bin_java_attr_calc_size (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr)
size = ((RBinJavaAttrMetas *) attr->metas->type_info)->allocs->calc_size (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return size;
}
R_API ut64 r_bin_java_unknown_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_unknown_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
return r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API ut64 r_bin_java_code_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaExceptionEntry *exc_entry = NULL;
RBinJavaAttrInfo *_attr = NULL;
RListIter *iter, *iter_tmp;
ut64 size = 0;
if (attr) {
//attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
//attr->info.code_attr.max_stack = R_BIN_JAVA_USHORT (buffer, 0);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//attr->info.code_attr.max_locals = R_BIN_JAVA_USHORT (buffer, 2);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//attr->info.code_attr.code_length = R_BIN_JAVA_UINT (buffer, 4);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
if (attr->info.code_attr.code) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += attr->info.code_attr.code_length;
}
//attr->info.code_attr.exception_table_length = R_BIN_JAVA_USHORT (buffer, offset);
size += 2;
r_list_foreach_safe (attr->info.code_attr.exception_table, iter, iter_tmp, exc_entry) {
//exc_entry->start_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//exc_entry->end_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//exc_entry->handler_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//exc_entry->catch_type = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
//attr->info.code_attr.attributes_count = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
if (attr->info.code_attr.attributes_count > 0) {
r_list_foreach_safe (attr->info.code_attr.attributes, iter, iter_tmp, _attr) {
size += r_bin_java_attr_calc_size (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_code_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaExceptionEntry *exc_entry = NULL;
RBinJavaAttrInfo *attr = NULL, *_attr = NULL;
ut32 k = 0, cur_location;
ut64 offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if(attr == NULL)
return attr;
attr->type = R_BIN_JAVA_ATTR_TYPE_CODE_ATTR;
2013-12-13 18:20:18 +00:00
attr->info.code_attr.max_stack = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.code_attr.max_locals = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.code_attr.code_length = R_BIN_JAVA_UINT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 4;
attr->info.code_attr.code_offset = buf_offset+offset;
attr->info.code_attr.code = (ut8* ) malloc (attr->info.code_attr.code_length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.code_attr.code == NULL) {
eprintf ("Handling Code Attributes: Unable to allocate memory (%u bytes )for a code.\n", attr->info.code_attr.code_length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr;
}
R_BIN_JAVA_GLOBAL_BIN->current_code_attr = attr;
memset (attr->info.code_attr.code, 0, attr->info.code_attr.code_length);
memcpy (attr->info.code_attr.code, buffer+offset, attr->info.code_attr.code_length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += attr->info.code_attr.code_length;
attr->info.code_attr.exception_table_length = R_BIN_JAVA_USHORT (buffer, offset);
offset += 2;
attr->info.code_attr.exception_table = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
for (k = 0; k < attr->info.code_attr.exception_table_length; k++) {
cur_location = buf_offset+offset;
//r_buf_read_at(bin->b, bin->b->cur, (ut8*)buf, 8);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
exc_entry = (RBinJavaExceptionEntry *) malloc (sizeof (RBinJavaExceptionEntry));
if (exc_entry == NULL) {
eprintf ("Handling Code Attributes :Unable to allocate memory (%u bytes )for a new exception handler structure.\n", 8);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
}
exc_entry->file_offset = cur_location;
exc_entry->start_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
exc_entry->end_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
exc_entry->handler_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
exc_entry->catch_type = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
r_list_append (attr->info.code_attr.exception_table, exc_entry);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
exc_entry->size = 8;
}
//attr->info.code_attr.attributes_count = (unsigned int)r_bin_java_read_short(bin, bin->b->cur);
attr->info.code_attr.attributes_count = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
//IFDBG printf (" code Attributes_count: %d\n", attr->info.code_attr.attributes_count);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->info.code_attr.attributes = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.code_attr.attributes_count > 0) {
for (k = 0; k < attr->info.code_attr.attributes_count; k++) {
_attr = r_bin_java_read_next_attr_from_buffer (buffer+offset, sz-offset, buf_offset+offset);
if (_attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += _attr->size;
r_list_append (attr->info.code_attr.attributes, _attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
if (_attr && _attr->type == R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TABLE_ATTR) {
IFDBG printf ("Parsed the LocalVariableTable, preparing the implicit mthod frame.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG r_bin_java_print_attr_summary(_attr);
attr->info.code_attr.implicit_frame = r_bin_java_build_stack_frame_from_local_variable_table (R_BIN_JAVA_GLOBAL_BIN, _attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG r_bin_java_print_stack_map_frame_summary(attr->info.code_attr.implicit_frame);
}
}
}
if (attr->info.code_attr.implicit_frame == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// build a default implicit_frame
attr->info.code_attr.implicit_frame = r_bin_java_default_stack_frame ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->size = offset;
return attr;
}
R_API RBinJavaAttrInfo* r_bin_java_constant_value_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_CONST_VALUE_ATTR;
attr->info.constant_value_attr.constantvalue_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->size = offset;
}
//IFDBG r_bin_java_print_constant_value_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_constant_value_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size = 6;
size += 2;
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_deprecated_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_DEPRECATED_ATTR;
attr->size = offset;
}
//IFDBG r_bin_java_print_deprecated_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_deprecated_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size = 6;
}
//IFDBG r_bin_java_print_deprecated_attr_summary(attr);
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_signature_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_SOURCE_FILE_ATTR;
attr->info.source_file_attr.sourcefile_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.signature_attr.signature_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.signature_attr.signature = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, attr->info.signature_attr.signature_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.signature_attr.signature == NULL)
eprintf ("r_bin_java_signature_attr_new: Unable to resolve the Signature UTF8 String Index: 0x%02x\n", attr->info.signature_attr.signature_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->size = offset;
//IFDBG r_bin_java_print_source_code_file_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_signature_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return size;
}
size += 6;
//attr->info.source_file_attr.sourcefile_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//attr->info.signature_attr.signature_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_enclosing_methods_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_ENCLOSING_METHOD_ATTR;
attr->info.enclosing_method_attr.class_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.enclosing_method_attr.method_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.enclosing_method_attr.class_name = r_bin_java_get_name_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, attr->info.enclosing_method_attr.class_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.enclosing_method_attr.class_name == NULL)
eprintf ("Could not resolve enclosing class name for the enclosed method.\n");
attr->info.enclosing_method_attr.method_name = r_bin_java_get_name_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, attr->info.enclosing_method_attr.method_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.enclosing_method_attr.class_name == NULL)
eprintf ("Could not resolve method descriptor for the enclosed method.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->info.enclosing_method_attr.method_descriptor = r_bin_java_get_desc_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, attr->info.enclosing_method_attr.method_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.enclosing_method_attr.method_name == NULL)
eprintf ("Could not resolve method name for the enclosed method.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->size = offset;
return attr;
}
R_API ut64 r_bin_java_enclosing_methods_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
//attr->info.enclosing_method_attr.class_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//attr->info.enclosing_method_attr.method_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_exceptions_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0, offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_LINE_NUMBER_TABLE_ATTR;
attr->info.exceptions_attr.number_of_exceptions = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.exceptions_attr.exception_idx_table = (ut16 *) malloc ( sizeof (ut16)* attr->info.exceptions_attr.number_of_exceptions);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
for (i = 0; i < attr->info.exceptions_attr.number_of_exceptions; i++) {
attr->info.exceptions_attr.exception_idx_table[i] = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
}
attr->size = offset;
//IFDBG r_bin_java_print_exceptions_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_exceptions_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0, i = 0;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
for (i = 0; i < attr->info.exceptions_attr.number_of_exceptions; i++) {
//attr->info.exceptions_attr.exception_idx_table[i] = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_inner_classes_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaClassesAttribute *icattr;
RBinJavaAttrInfo *attr = NULL;
ut32 i = 0;
ut64 offset = 0, cur_location;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_INNER_CLASSES_ATTR;
attr->info.inner_classes_attr.number_of_classes = R_BIN_JAVA_USHORT (buffer, offset);
attr->info.inner_classes_attr.classes = r_list_new ();
for(i = 0; i < attr->info.inner_classes_attr.number_of_classes; i++) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
cur_location = buf_offset + offset;
icattr = (RBinJavaClassesAttribute*) malloc (sizeof (RBinJavaClassesAttribute));
if (icattr) {
memset (icattr, 0, sizeof (RBinJavaClassesAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("Handling Inner Classes Attributes :Unable to allocate memory (%lu bytes )for a new exception handler structure.\n", sizeof (RBinJavaLocalVariableAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
}
icattr->inner_class_info_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
icattr->outer_class_info_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
icattr->inner_name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
icattr->inner_class_access_flags = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
icattr->flags_str = retrieve_class_method_access_string(icattr->inner_class_access_flags);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
icattr->file_offset = cur_location;
icattr->size = 8;
icattr->name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, icattr->inner_name_idx);
if(icattr->name == NULL) {
icattr->name = r_str_dup (NULL, "NULL");
eprintf ("r_bin_java_inner_classes_attr: Unable to find the name for %d index.\n", icattr->inner_name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_append (attr->info.inner_classes_attr.classes, (void *) icattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->size = offset;
//IFDBG r_bin_java_print_inner_classes_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_inner_class_attr_calc_size(RBinJavaClassesAttribute *icattr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (icattr) {
//icattr->inner_class_info_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//icattr->outer_class_info_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//icattr->inner_name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//icattr->inner_class_access_flags = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
return size;
}
R_API ut64 r_bin_java_inner_classes_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RListIter *iter, *iter_tmp;
RBinJavaClassesAttribute *icattr = NULL;
if (attr == NULL)
return size;
size += 6;
r_list_foreach_safe (attr->info.inner_classes_attr.classes, iter, iter_tmp, icattr) {
size += r_bin_java_inner_class_attr_calc_size (icattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_line_number_table_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLineNumberAttribute *lnattr;
RBinJavaAttrInfo *attr = NULL;
ut32 i = 0;
ut64 cur_location, offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO printf
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_LINE_NUMBER_TABLE_ATTR;
attr->info.line_number_table_attr.line_number_table_length = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.line_number_table_attr.line_number_table = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
for(i = 0; i < attr->info.line_number_table_attr.line_number_table_length; i++) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
cur_location = buf_offset+offset;
lnattr = (RBinJavaLineNumberAttribute*) malloc (sizeof (RBinJavaLineNumberAttribute));
if (lnattr) {
memset (lnattr, 0, sizeof (RBinJavaLineNumberAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("Handling Local Variable Table Attributes :Unable to allocate memory (%lu bytes) for a new exception handler structure.\n", sizeof (RBinJavaLocalVariableAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
}
lnattr->start_pc = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lnattr->line_number = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lnattr->file_offset = cur_location;
lnattr->size = 4;
r_list_append (attr->info.line_number_table_attr.line_number_table, lnattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->size = offset;
//IFDBG r_bin_java_print_line_number_table_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_line_number_table_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RBinJavaLineNumberAttribute *lnattr;
RListIter *iter, *iter_tmp;
if (attr == NULL)
return size;
size += 6;
r_list_foreach_safe (attr->info.line_number_table_attr.line_number_table, iter, iter_tmp, lnattr) {
//lnattr->start_pc = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lnattr->line_number = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_source_debug_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
RBinJavaAttrInfo *attr = NULL;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf bad allocation
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_SOURCE_DEBUG_EXTENTSION_ATTR;
if (attr->length == 0) {
eprintf ("r_bin_java_source_debug_attr_new: Attempting to allocate 0 bytes for debug_extension.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->info.debug_extensions.debug_extension = NULL;
return attr;
}else if ((attr->length+offset) > sz) {
eprintf ("r_bin_java_source_debug_attr_new: Expected %d bytes got %lld bytes for debug_extension.\n", attr->length, (offset + sz));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->info.debug_extensions.debug_extension = (ut8 *) malloc (attr->length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (attr->info.debug_extensions.debug_extension && (attr->length > (sz-offset)) ) {
memcpy (attr->info.debug_extensions.debug_extension, buffer+offset, sz-offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else if (attr->info.debug_extensions.debug_extension) {
memcpy (attr->info.debug_extensions.debug_extension, buffer+offset, attr->length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("r_bin_java_source_debug_attr_new: Unable to allocated the data for the debug_extension.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
offset += attr->length;
attr->size = offset;
return attr;
}
R_API ut64 r_bin_java_source_debug_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return size;
}
size += 6;
if (attr->info.debug_extensions.debug_extension) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += attr->length;
}
return size;
}
R_API ut64 r_bin_java_local_variable_table_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RListIter *iter, *iter_tmp;
RBinJavaLocalVariableAttribute* lvattr = NULL;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return size;
}
size += 6;
//attr->info.local_variable_table_attr.table_length = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (attr->info.local_variable_table_attr.local_variable_table, iter, iter_tmp, lvattr) {
//lvattr->start_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->length = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->name_idx = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->descriptor_idx = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->index = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_local_variable_table_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrInfo *attr = NULL;
RBinJavaLocalVariableAttribute* lvattr;
ut64 cur_location = 0, offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return attr;
}
ut32 i = 0;
attr->type = R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TABLE_ATTR;
attr->info.local_variable_table_attr.table_length = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.local_variable_table_attr.local_variable_table = r_list_new ();
for(i = 0; i < attr->info.local_variable_table_attr.table_length; i++) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
cur_location = buf_offset + offset;
lvattr = (RBinJavaLocalVariableAttribute*) malloc (sizeof (RBinJavaLocalVariableAttribute));
if (lvattr) {
memset (lvattr, 0, sizeof (RBinJavaLocalVariableAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("Handling Local Variable Table Attributes :Unable to allocate memory (%lu bytes )for a new exception handler structure.\n", sizeof (RBinJavaLocalVariableAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
}
lvattr->start_pc = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->length = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->name_idx = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->descriptor_idx = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->index = R_BIN_JAVA_USHORT (buffer,offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
lvattr->file_offset = cur_location;
lvattr->name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, lvattr->name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
lvattr->size = 10;
if(lvattr->name == NULL) {
lvattr->name = r_str_dup (NULL, "NULL");
eprintf ("r_bin_java_local_variable_table_attr_new: Unable to find the name for %d index.\n", lvattr->name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
lvattr->descriptor = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, lvattr->descriptor_idx);
if(lvattr->descriptor == NULL) {
lvattr->descriptor = r_str_dup (NULL, "NULL");
eprintf ("r_bin_java_local_variable_table_attr_new: Unable to find the descriptor for %d index.\n", lvattr->descriptor_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_list_append (attr->info.local_variable_table_attr.local_variable_table, lvattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->size = offset;
//IFDBG r_bin_java_print_local_variable_table_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_local_variable_type_table_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLocalVariableTypeAttribute* lvattr;
RListIter *iter, *iter_tmp;
ut64 size = 0;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
// attr->info.local_variable_type_table_attr.table_length = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (attr->info.local_variable_type_table_attr.local_variable_table, iter, iter_tmp, lvattr) {
//lvattr->start_pc = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->length = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->signature_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//lvattr->index = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_local_variable_type_table_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLocalVariableTypeAttribute* lvattr;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
ut32 i = 0;
attr = r_bin_java_default_attr_new (buffer, sz, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TYPE_TABLE_ATTR;
attr->info.local_variable_type_table_attr.table_length = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.local_variable_type_table_attr.local_variable_table = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
for(i = 0; i < attr->info.local_variable_type_table_attr.table_length; i++) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 cur_location = buf_offset + offset;
lvattr = (RBinJavaLocalVariableTypeAttribute*) malloc (sizeof (RBinJavaLocalVariableTypeAttribute));
if (lvattr) {
memset (lvattr, 0, sizeof (RBinJavaLocalVariableTypeAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("Handling Local Variable Table Attributes :Unable to allocate memory (%lu bytes )for a new exception handler structure.\n", sizeof (RBinJavaLocalVariableAttribute));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
}
lvattr->start_pc = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->length = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->signature_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
lvattr->index = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
lvattr->file_offset = cur_location;
lvattr->name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, lvattr->name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
lvattr->size = 10;
if(lvattr->name == NULL) {
lvattr->name = r_str_dup (NULL, "NULL");
eprintf ("r_bin_java_local_variable_type_table_attr_new: Unable to find the name for %d index.\n", lvattr->name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
lvattr->signature = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, lvattr->signature_idx);
if(lvattr->signature == NULL) {
lvattr->signature = r_str_dup (NULL, "NULL");
eprintf ("r_bin_java_local_variable_type_table_attr_new: Unable to find the descriptor for %d index.\n", lvattr->signature_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_list_append (attr->info.local_variable_type_table_attr.local_variable_table, lvattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
//IFDBG r_bin_java_print_local_variable_type_table_attr_summary(attr);
attr->size = offset;
return attr;
}
R_API RBinJavaAttrInfo* r_bin_java_source_code_file_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return attr;
}
attr->type = R_BIN_JAVA_ATTR_TYPE_SOURCE_FILE_ATTR;
attr->info.source_file_attr.sourcefile_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->size = offset;
//IFDBG r_bin_java_print_source_code_file_attr_summary(attr);
return attr;
}
R_API ut64 r_bin_java_source_code_file_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return size;
}
size += (6 + 2);
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_synthetic_attr_new (ut8 *buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
attr->type = R_BIN_JAVA_ATTR_TYPE_SYNTHETIC_ATTR;
attr->size = offset;
return attr;
}
R_API ut64 r_bin_java_synthetic_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return size;
}
size += 6;
return size;
}
R_API RBinJavaInterfaceInfo* r_bin_java_interface_new (RBinJavaObj *bin, ut8 *buffer, ut64 sz) {
RBinJavaInterfaceInfo *interface_obj = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
interface_obj = (RBinJavaInterfaceInfo *) malloc (sizeof (RBinJavaInterfaceInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG eprintf("Parsing RBinJavaInterfaceInfo\n");
if(interface_obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Unable to allocate memory for RBinJavaInterfaceInfo.\n");
return interface_obj;
}
memset (interface_obj, 0, sizeof (RBinJavaInterfaceInfo));
if (buffer) {
interface_obj->class_info_idx = R_BIN_JAVA_USHORT (buffer, 0);
interface_obj->cp_class = r_bin_java_get_item_from_bin_cp_list (bin, interface_obj->class_info_idx);
if (interface_obj->cp_class) {
interface_obj->name = r_bin_java_get_item_name_from_bin_cp_list (bin, interface_obj->cp_class);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
interface_obj->name = r_str_dup (NULL, "NULL");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}else{
interface_obj->class_info_idx = 0xffff;
interface_obj->name = r_str_dup (NULL, "NULL");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return interface_obj;
}
R_API RBinJavaVerificationObj* r_bin_java_verification_info_from_type(RBinJavaObj *bin, R_BIN_JAVA_STACKMAP_TYPE type, ut32 value) {
RBinJavaVerificationObj *stack_element = (RBinJavaVerificationObj *) malloc (sizeof (RBinJavaVerificationObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (stack_element == NULL)
return NULL;
memset (stack_element, 0, sizeof (RBinJavaVerificationObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_element->tag = type;
if (stack_element->tag == R_BIN_JAVA_STACKMAP_OBJECT) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_element->info.obj_val_cp_idx = (ut16) value;
}
else if (stack_element->tag == R_BIN_JAVA_STACKMAP_UNINIT) {
/*if (bin->offset_sz == 4) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_element->info.uninit_offset = value;
}else{
stack_element->info.uninit_offset = (ut16) value;
}*/
stack_element->info.uninit_offset = (ut16) value;
}
return stack_element;
}
R_API RBinJavaVerificationObj* r_bin_java_read_from_buffer_verification_info_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
RBinJavaVerificationObj *stack_element = (RBinJavaVerificationObj *) malloc (sizeof (RBinJavaVerificationObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (stack_element == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// eprintf error here
return stack_element;
}
memset (stack_element, 0, sizeof (RBinJavaVerificationObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_element->file_offset = buf_offset;
/*if (sz == 0) {
eprintf ("rbin_java_read_next_verification_info: Failed to read bytes for tag.\n");
//r_bin_java_verification_info_free (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//return NULL;
}*/
stack_element->tag = buffer[offset];
offset += 1;
if (stack_element->tag == R_BIN_JAVA_STACKMAP_OBJECT) {
/*if( (offset + 2) <= sz) {
stack_element->info.obj_val_cp_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
}else{
eprintf ("rbin_java_read_next_verification_info: Failed to read bytes for StackMapTable R_BIN_JAVA_STACKMAP_OBJECT Object.\n");
//r_bin_java_verification_info_free (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//return stack_element;
}*/
stack_element->info.obj_val_cp_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
}
else if (stack_element->tag == R_BIN_JAVA_STACKMAP_UNINIT) {
/*if( (offset + 2) <= sz) {
stack_element->info.uninit_offset = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
}else{
eprintf ("rbin_java_read_next_verification_info: Failed to read bytes for StackMapTable R_BIN_JAVA_STACKMAP_UNINIT Object.\n");
//r_bin_java_verification_info_free (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//return stack_element;
}*/
stack_element->info.uninit_offset = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
}
if (R_BIN_JAVA_STACKMAP_UNINIT < stack_element->tag) {
eprintf ("rbin_java_read_next_verification_info: Unknown Tag: 0x%02x\n", stack_element->tag);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
stack_element->size = offset;
return stack_element;
}
R_API ut64 rbin_java_verification_info_calc_size(RBinJavaVerificationObj* stack_element) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 sz = 0;
if (stack_element == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// eprintf error here
return sz;
}
// r_buf_read_at (bin->b, offset, (ut8*)(&stack_element->tag), 1)
sz += 1;
if (stack_element->tag == R_BIN_JAVA_STACKMAP_OBJECT) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//r_buf_read_at (bin->b, offset+1, (ut8*)buf, 2)
sz += 2;
}
else if (stack_element->tag == R_BIN_JAVA_STACKMAP_UNINIT) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//r_buf_read_at (bin->b, offset+1, (ut8*)buf, 2)
sz += 2;
}
return sz;
}
R_API RBinJavaStackMapFrameMetas* r_bin_java_determine_stack_frame_type(ut8 tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 type_value = 0;
if (tag < 64)
type_value = R_BIN_JAVA_STACK_FRAME_SAME;
else if (63 < tag && tag < 128)
type_value = R_BIN_JAVA_STACK_FRAME_SAME_LOCALS_1;
else if (247 < tag && tag < 251)
type_value = R_BIN_JAVA_STACK_FRAME_CHOP;
else if (tag == 251)
type_value = R_BIN_JAVA_STACK_FRAME_SAME_FRAME_EXTENDED;
else if (251 < tag && tag < 255)
type_value = R_BIN_JAVA_STACK_FRAME_APPEND;
else if (tag == 255)
type_value = R_BIN_JAVA_STACK_FRAME_FULL_FRAME;
else
type_value = R_BIN_JAVA_STACK_FRAME_RESERVED;
return &R_BIN_JAVA_STACK_MAP_FRAME_METAS[type_value];
}
void copy_type_info_to_stack_frame_list (RList *type_list, RList *sf_list) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaVerificationObj *ver_obj, *new_ver_obj;
if (type_list == NULL)
return;
if (sf_list == NULL)
return;
r_list_foreach_safe (type_list, iter, iter_tmp, ver_obj) {
new_ver_obj = (RBinJavaVerificationObj *) malloc (sizeof (RBinJavaVerificationObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// FIXME: how to handle failed memory allocation?
if(ver_obj) {
memcpy (new_ver_obj, ver_obj, sizeof (RBinJavaVerificationObj));
r_list_append (sf_list, (void *) new_ver_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
void copy_type_info_to_stack_frame_list_up_to_idx (RList *type_list, RList *sf_list, ut64 idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaVerificationObj *ver_obj, *new_ver_obj;
ut32 pos = 0;
if (type_list == NULL)
return;
if (sf_list == NULL)
return;
r_list_foreach_safe (type_list, iter, iter_tmp, ver_obj) {
new_ver_obj = (RBinJavaVerificationObj *) malloc (sizeof (RBinJavaVerificationObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// FIXME: how to handle failed memory allocation?
if(ver_obj) {
memcpy (new_ver_obj, ver_obj, sizeof (RBinJavaVerificationObj));
r_list_append (sf_list, (void *) new_ver_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
pos++;
if (pos == idx) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API ut64 r_bin_java_stack_map_frame_calc_size(RBinJavaStackMapFrame *stack_frame) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RListIter *iter, *iter_tmp;
RBinJavaVerificationObj *stack_element;
if (stack_frame) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//stack_frame->tag = buffer[offset];
size += 1;
if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_SAME) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Nothing to read
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_SAME_LOCALS_1) {
r_list_foreach_safe (stack_frame->stack_items, iter, iter_tmp, stack_element) {
size += rbin_java_verification_info_calc_size (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_CHOP) {
//stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_SAME_FRAME_EXTENDED) {
//stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (stack_frame->stack_items, iter, iter_tmp, stack_element) {
size += rbin_java_verification_info_calc_size (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_APPEND) {
//stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2 ;
r_list_foreach_safe (stack_frame->stack_items, iter, iter_tmp, stack_element) {
size += rbin_java_verification_info_calc_size (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_FULL_FRAME) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//stack_frame->number_of_locals = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (stack_frame->local_items, iter, iter_tmp, stack_element) {
size += rbin_java_verification_info_calc_size (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
//stack_frame->number_of_stack_items = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (stack_frame->stack_items, iter, iter_tmp, stack_element) {
size += rbin_java_verification_info_calc_size (stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
return size;
}
R_API RBinJavaStackMapFrame* r_bin_java_stack_map_frame_new (ut8* buffer, ut64 sz, RBinJavaStackMapFrame *p_frame, ut64 buf_offset) {
RBinJavaStackMapFrame *stack_frame = r_bin_java_default_stack_frame ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaVerificationObj *stack_element;
ut64 offset = 0;
int i = 0;
if(stack_frame == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return stack_frame;
}
stack_frame->tag = buffer[offset];
offset += 1;
stack_frame->metas->type_info = (void *) r_bin_java_determine_stack_frame_type (stack_frame->tag);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame->type = ((RBinJavaStackMapFrameMetas *) stack_frame->metas->type_info)->type;
stack_frame->local_items = r_list_new ();
stack_frame->stack_items = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame->file_offset = buf_offset;
stack_frame->p_stack_frame = p_frame;
if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_SAME) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Maybe? 1. Copy the previous frames locals and set the locals count.
//copy_type_info_to_stack_frame_list_up_to_idx (p_frame->local_items, stack_frame->local_items, idx);
if (p_frame)
stack_frame->number_of_locals = p_frame->number_of_locals;
2013-12-07 22:45:55 +00:00
else {
IFINT eprintf ("><?><\n");
IFDBG eprintf ("Unable to set previous stackframe with the number of locals (current info.code_attr.implicit_frame was probably not set :/)");
}
IFDBG eprintf ("r_bin_java_stack_map_frame_new: TODO Stack Frame Same Locals Condition is untested, so there may be issues.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_SAME_LOCALS_1) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// 1. Read the stack type
stack_frame->number_of_stack_items = 1;
stack_element = r_bin_java_read_from_buffer_verification_info_new (buffer+offset, sz-offset, buf_offset+offset);
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Parsed R_BIN_JAVA_STACK_FRAME_SAME_LOCALS_1.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (stack_element) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += stack_element->size;
}else{
eprintf ("r_bin_java_stack_map_frame_new: Unable to parse the Stack Items for the stack frame.\n");
r_bin_java_stack_frame_free (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return NULL;
}
r_list_append (stack_frame->stack_items, (void *) stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Maybe? 3. Copy the previous frames locals and set the locals count.
//copy_type_info_to_stack_frame_list_up_to_idx (p_frame->local_items, stack_frame->local_items, idx);
if (p_frame)
stack_frame->number_of_locals = p_frame->number_of_locals;
2013-12-07 22:45:55 +00:00
else {
IFDBG eprintf ("Unable to set previous stackframe with the number of locals (current info.code_attr.implicit_frame was probably not set :/)");
}
2013-12-07 22:45:55 +00:00
IFDBG eprintf ("r_bin_java_stack_map_frame_new: TODO Stack Frame Same Locals 1 Stack Element Condition is untested, so there may be issues.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_CHOP) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// 1. Calculate the max index we want to copy from the list of the
// previous frames locals
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Parsing R_BIN_JAVA_STACK_FRAME_CHOP.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut16 k = 251 - stack_frame->tag;/*,
idx = p_frame->number_of_locals - k;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
*/
// 2. read the uoffset value
stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
// Maybe? 3. Copy the previous frames locals and set the locals count.
//copy_type_info_to_stack_frame_list_up_to_idx (p_frame->local_items, stack_frame->local_items, idx);
if (p_frame)
stack_frame->number_of_locals = p_frame->number_of_locals;
2013-12-07 22:45:55 +00:00
else {
IFINT eprintf ("><?><\n");
IFDBG eprintf ("Unable to set previous stackframe with the number of locals (current info.code_attr.implicit_frame was probably not set :/)");
}
2013-12-07 22:45:55 +00:00
IFDBG eprintf ("r_bin_java_stack_map_frame_new: TODO Stack Frame Chop Condition is untested, so there may be issues.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_SAME_FRAME_EXTENDED) {
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Parsing R_BIN_JAVA_STACK_FRAME_SAME_FRAME_EXTENDED.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// 1. Read the uoffset
stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
// 2. Read the stack element type
stack_frame->number_of_stack_items = 1;
stack_element = r_bin_java_read_from_buffer_verification_info_new (buffer+offset, sz-offset, buf_offset+offset);
if(stack_element) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += stack_element->size;
}else{
eprintf ("r_bin_java_stack_map_frame_new: Unable to parse the Stack Items for the stack frame.\n");
r_bin_java_stack_frame_free (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return NULL;
}
r_list_append (stack_frame->stack_items, (void *) stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Maybe? 3. Copy the previous frames locals to the current locals
//copy_type_info_to_stack_frame_list_up_to_idx (p_frame->local_items, stack_frame->local_items, idx);
if (p_frame)
stack_frame->number_of_locals = p_frame->number_of_locals;
2013-12-07 22:45:55 +00:00
else {
IFINT eprintf ("><?><\n");
IFDBG eprintf ("Unable to set previous stackframe with the number of locals (current info.code_attr.implicit_frame was probably not set :/)");
}
2013-12-07 22:45:55 +00:00
IFDBG eprintf ("r_bin_java_stack_map_frame_new: TODO Stack Frame Same Locals Frame Stack 1 Extended Condition is untested, so there may be issues.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_APPEND) {
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Parsing R_BIN_JAVA_STACK_FRAME_APPEND.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// 1. Calculate the max index we want to copy from the list of the
// previous frames locals
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut16 k = stack_frame->tag - 251,
i = 0;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// 2. Read the uoffset
stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Maybe? 3. Copy the previous frames locals to the current locals
//copy_type_info_to_stack_frame_list_up_to_idx (p_frame->local_items, stack_frame->local_items, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// 4. Read off the rest of the appended locals types
for (i=0; i < k; i++) {
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Parsing verifying the k'th frame: %d of %d.\n", i, k);
stack_element = r_bin_java_read_from_buffer_verification_info_new (buffer+offset, sz-offset, buf_offset+offset);
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Completed Parsing\n");
if (stack_element) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += stack_element->size;
}else{
eprintf ("r_bin_java_stack_map_frame_new: Unable to parse the locals for the stack frame.\n");
r_bin_java_stack_frame_free (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return NULL;
}
r_list_append (stack_frame->local_items, (void *) stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Breaking out of loop");
IFDBG eprintf("p_frame: %p\n", p_frame);
if (p_frame)
stack_frame->number_of_locals = p_frame->number_of_locals + k;
2013-12-07 22:45:55 +00:00
else {
IFINT eprintf ("><?><\n");
IFDBG eprintf ("Unable to set previous stackframe with the number of locals (current info.code_attr.implicit_frame was probably not set :/)");
}
IFDBG eprintf ("r_bin_java_stack_map_frame_new: TODO Stack Frame Same Locals Frame Stack 1 Extended Condition is untested, so there may be issues.\n");
}else if(stack_frame->type == R_BIN_JAVA_STACK_FRAME_FULL_FRAME) {
IFDBG eprintf ("r_bin_java_stack_map_frame_new: Parsing R_BIN_JAVA_STACK_FRAME_FULL_FRAME.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame->offset_delta = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
//IFDBG printf ("r_bin_java_stack_map_frame_new: Code Size > 65535, read( %d bytes), offset = 0x%08x.\n", var_sz, stack_frame->offset_delta);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Read the number of variables based on the max # local variable
stack_frame->number_of_locals = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
//IFDBG printf ("r_bin_java_stack_map_frame_new: Max ulocalvar > 65535, read( %d bytes), number_of_locals = 0x%08x.\n", var_sz, stack_frame->number_of_locals);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG r_bin_java_print_stack_map_frame_summary(stack_frame);
// read the number of locals off the stack
for (i = 0; i < stack_frame->number_of_locals; i++) {
stack_element = r_bin_java_read_from_buffer_verification_info_new (buffer+offset, sz-offset, buf_offset+offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (stack_element) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += stack_element->size;
//r_list_append (stack_frame->local_items, (void *) stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("r_bin_java_stack_map_frame_new: Unable to parse the locals for the stack frame.\n");
r_bin_java_stack_frame_free (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return NULL;
}
r_list_append (stack_frame->local_items, (void *) stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
// Read the number of stack items based on the max size of stack
stack_frame->number_of_stack_items = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
//IFDBG printf ("r_bin_java_stack_map_frame_new: Max ustack items > 65535, read( %d bytes), number_of_locals = 0x%08x.\n", var_sz, stack_frame->number_of_stack_items);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// read the stack items
for (i = 0; i < stack_frame->number_of_stack_items; i++) {
stack_element = r_bin_java_read_from_buffer_verification_info_new (buffer+offset, sz-offset, buf_offset+offset);
if(stack_element) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += stack_element->size;
// r_list_append (stack_frame->stack_items, (void *) stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("r_bin_java_stack_map_frame_new: Unable to parse the the stack items for the stack frame.\n");
r_bin_java_stack_frame_free (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return NULL;
}
r_list_append (stack_frame->local_items, (void *) stack_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
//IFDBG printf ("Created a stack frame at offset(0x%08"PFMT64x") of size: %d\n", buf_offset, stack_frame->size);//r_bin_java_print_stack_map_frame_summary(stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame->size = offset;
//IFDBG r_bin_java_print_stack_map_frame_summary(stack_frame);
return stack_frame;
}
ut16 r_bin_java_find_cp_class_ref_from_name_idx (RBinJavaObj *bin, ut16 name_idx) {
ut16 pos, len = (ut16) r_list_length (bin->cp_list);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaCPTypeObj *item;
for (pos = 0; pos < len; pos++) {
item = (RBinJavaCPTypeObj *) r_list_get_n (bin->cp_list, pos);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (item && item->tag == R_BIN_JAVA_CP_CLASS && item->info.cp_class.name_idx == name_idx)
break;
}
return pos;
}
R_API RBinJavaStackMapFrame* r_bin_java_default_stack_frame() {
RBinJavaStackMapFrame* stack_frame = (RBinJavaStackMapFrame *) malloc (sizeof (RBinJavaStackMapFrame));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(stack_frame == NULL)
return stack_frame;
memset (stack_frame, 0, sizeof (RBinJavaStackMapFrame));
stack_frame->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
if(stack_frame->metas == NULL) {
free (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return NULL;
}
memset (stack_frame->metas, 0, sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame->metas->type_info = (void *) &R_BIN_JAVA_STACK_MAP_FRAME_METAS[R_BIN_JAVA_STACK_FRAME_IMPLICIT];
stack_frame->type = ((RBinJavaStackMapFrameMetas *) stack_frame->metas->type_info)->type;
stack_frame->local_items = r_list_new ();
stack_frame->stack_items = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame->number_of_stack_items = 0;
stack_frame->number_of_locals = 0;
return stack_frame;
}
R_API RBinJavaStackMapFrame* r_bin_java_build_stack_frame_from_local_variable_table(RBinJavaObj *bin, RBinJavaAttrInfo *attr) {
RBinJavaStackMapFrame *stack_frame = r_bin_java_default_stack_frame ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLocalVariableAttribute *lvattr = NULL;
RBinJavaVerificationObj *type_item;
RListIter *iter = NULL, *iter_tmp = NULL;
ut32 value_cnt = 0;
if (bin == NULL || attr == NULL || attr->type != R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TABLE_ATTR) {
eprintf ("Attempting to create a stack_map frame from a bad attribute.\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return stack_frame;
}
if(stack_frame == NULL)
return stack_frame;
stack_frame->number_of_locals = attr->info.local_variable_table_attr.table_length;
r_list_foreach_safe (attr->info.local_variable_table_attr.local_variable_table, iter, iter_tmp, lvattr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 pos = 0;
ut8 value = 'N';
ut8 is_object = 0;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if ( lvattr == NULL)
continue;
// knock the array Types
while (lvattr->descriptor[pos] == '[') {
is_object = 1;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
pos ++;
}
value = lvattr->descriptor[pos];
//IFDBG printf ("Found the following type value: %c at pos %d in %s\n", value, pos, lvattr->descriptor);
if (value == 'I' || value == 'Z' || value == 'S' || value == 'B' || value == 'C') {
type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_INTEGER, 0);
}else if (value == 'F') {
type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_FLOAT, 0);
}else if (value == 'D') {
type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_DOUBLE, 0);
}else if (value == 'J') {
type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_LONG, 0);
}else if (value == 'L') {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO: FIXME write something that will iterate over the CP Pool and find the
// CONSTANT_Class_info referencing this
ut16 idx = r_bin_java_find_cp_class_ref_from_name_idx (bin, lvattr->name_idx);
type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_OBJECT, idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
eprintf ("r_bin_java_build_stack_frame_from_local_variable_table: not sure how to handle: name: %s, type: %s\n", lvattr->name, lvattr->descriptor);
type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_NULL, 0);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
/*else if (strcmp("", "") == 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
type_item = r_bin_java_verification_info_from_type(bin, R_BIN_JAVA_STACKMAP_DOUBLE, 0);
}*/
if (type_item)
r_list_append (stack_frame->local_items, (void *)type_item);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
value_cnt++;
}
if (value_cnt != attr->info.local_variable_table_attr.table_length) {
IFDBG eprintf ("r_bin_java_build_stack_frame_from_local_variable_table: Number of locals not accurate. Expected %d but got %d", attr->info.local_variable_table_attr.table_length, value_cnt);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return stack_frame;
}
R_API ut64 r_bin_java_stack_map_table_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RListIter *iter, *iter_tmp;
RBinJavaStackMapFrame *stack_frame = NULL;
if (attr) {
//attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return size;
}
//IFDBG r_bin_java_print_source_code_file_attr_summary(attr);
// Current spec does not call for variable sizes.
//attr->info.stack_map_table_attr.number_of_entries = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (attr->info.stack_map_table_attr.stack_map_frame_entries, iter, iter_tmp, stack_frame) {
size += r_bin_java_stack_map_frame_calc_size (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_stack_map_table_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
ut64 offset = 0;
RBinJavaStackMapFrame *stack_frame = NULL, *new_stack_frame = NULL;
RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
IFDBG eprintf ("r_bin_java_stack_map_table_attr_new: New stack map allocated.\n");
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return attr;
}
attr->info.stack_map_table_attr.stack_map_frame_entries = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
//IFDBG r_bin_java_print_source_code_file_attr_summary(attr);
// Current spec does not call for variable sizes.
attr->info.stack_map_table_attr.number_of_entries = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
IFDBG eprintf ("r_bin_java_stack_map_table_attr_new: Processing stack map, summary is:\n");
IFDBG r_bin_java_print_stack_map_table_attr_summary(attr);
for(i=0; i < attr->info.stack_map_table_attr.number_of_entries; i++) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// read next stack frame
IFDBG printf ("Reading StackMap Entry #%d @ 0x%08"PFMT64x"\n", i, buf_offset+offset);
if (stack_frame == NULL && R_BIN_JAVA_GLOBAL_BIN && R_BIN_JAVA_GLOBAL_BIN->current_code_attr){
IFDBG printf ("Setting an implicit frame at #%d @ 0x%08"PFMT64x"\n", i, buf_offset+offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame = R_BIN_JAVA_GLOBAL_BIN->current_code_attr->info.code_attr.implicit_frame;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
IFDBG printf ("Reading StackMap Entry #%d @ 0x%08"PFMT64x", current stack_frame: %p\n", i, buf_offset+offset, stack_frame);
new_stack_frame = r_bin_java_stack_map_frame_new (buffer+offset, sz-offset, stack_frame, buf_offset+offset);
if (new_stack_frame) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += new_stack_frame->size;
// append stack frame to the list
r_list_append (attr->info.stack_map_table_attr.stack_map_frame_entries, (void *) new_stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame = new_stack_frame;
}else{
eprintf ("r_bin_java_stack_map_table_attr_new: Unable to parse the the stack the stack frame for the stack map table.\n");
r_bin_java_stack_map_table_attr_free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = NULL;
break;
}
}
if (attr)
attr->size = offset;
return attr;
}
// End attribute types new
// Start new Constant Pool Types
R_API RBinJavaCPTypeObj* r_bin_java_do_nothing_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return (RBinJavaCPTypeObj *)NULL;
}
R_API ut64 r_bin_java_do_nothing_calc_size(RBinJavaCPTypeObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return 0;
}
R_API void r_bin_java_do_nothing_free (RBinJavaCPTypeObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return ;
}
R_API RBinJavaCPTypeObj* r_bin_java_unknown_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
obj = (RBinJavaCPTypeObj*) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[R_BIN_JAVA_CP_UNKNOWN];
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_unknown_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
size += 1;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_class_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_CLASS, tag, sz, "Class" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj*) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->info.cp_class.name_idx = R_BIN_JAVA_USHORT (buffer, 1);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_class_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
//ut8 tag = buffer[0];
size += 1;
//obj->info.cp_class.name_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 2;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_fieldref_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_FIELDREF, tag, sz, "FieldRef" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj*) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->info.cp_field.class_idx = R_BIN_JAVA_USHORT (buffer, 1);
obj->info.cp_field.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return (RBinJavaCPTypeObj*) obj;
}
R_API ut64 r_bin_java_fieldref_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_field.class_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 2;
//obj->info.cp_field.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3);
size += 2;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_methodref_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_METHODREF, tag, sz, "MethodRef" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->info.cp_method.class_idx = R_BIN_JAVA_USHORT (buffer, 1);
obj->info.cp_method.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_methodref_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_method.class_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 2;
//obj->info.cp_method.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3);
size += 2;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_interfacemethodref_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_INTERFACEMETHOD_REF, tag, sz, "InterfaceMethodRef" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->info.cp_interface.class_idx = R_BIN_JAVA_USHORT (buffer, 1);
obj->info.cp_interface.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return (RBinJavaCPTypeObj*) obj;
}
R_API ut64 r_bin_java_interfacemethodref_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_interface.class_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 2;
//obj->info.cp_interface.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3);
size += 2;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_string_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_STRING, tag, sz, "String" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return (RBinJavaCPTypeObj*) obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->info.cp_string.string_idx = R_BIN_JAVA_USHORT (buffer, 1);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_string_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_string.string_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 2;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_integer_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_INTEGER, tag, sz, "Integer" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);
memset (&obj->info.cp_integer.bytes, 0, sizeof (obj->info.cp_integer.bytes));
memcpy (&obj->info.cp_integer.bytes.raw, buffer+1, 4);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_integer_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_string.string_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 4;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_float_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_FLOAT, tag, sz, "Float" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
memset (&obj->info.cp_float.bytes, 0, sizeof (obj->info.cp_float.bytes));
memcpy (&obj->info.cp_float.bytes.raw, buffer, 4);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return (RBinJavaCPTypeObj*) obj;
}
R_API ut64 r_bin_java_float_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_string.string_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 4;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_long_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_LONG, tag, sz, "Long" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
memset (&obj->info.cp_long.bytes, 0, sizeof (obj->info.cp_long.bytes));
memcpy (&(obj->info.cp_long.bytes), buffer+1, 8);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_long_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_string.string_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 8;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_double_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_DOUBLE, tag, sz, "Double" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return (RBinJavaCPTypeObj*) obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
memset (&obj->info.cp_double.bytes, 0, sizeof (obj->info.cp_double.bytes));
memcpy (&obj->info.cp_double.bytes, buffer+1, 8);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_double_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
// tag
size += 1;
//obj->info.cp_string.string_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 8;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_utf8_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_UTF8, tag, sz, "Utf8" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->info.cp_utf8.length = R_BIN_JAVA_USHORT (buffer, 1);
obj->info.cp_utf8.bytes = (ut8 *) malloc (obj->info.cp_utf8.length+1);
if (obj->info.cp_utf8.bytes) {
memset (obj->info.cp_utf8.bytes, 0, obj->info.cp_utf8.length+1);
if (obj->info.cp_utf8.length < (sz - 3)) {
memcpy (obj->info.cp_utf8.bytes, buffer+3, (sz - 3));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->info.cp_utf8.length = sz - 3;
}else{
memcpy (obj->info.cp_utf8.bytes, buffer+3, obj->info.cp_utf8.length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
obj->value = obj->info.cp_utf8.bytes;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
else{
r_bin_java_obj_free (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj = NULL;
}
}
return obj;
}
R_API ut64 r_bin_java_utf8_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
size += 1;
if (obj && R_BIN_JAVA_CP_UTF8 == obj->tag) {
// memcpy (obj->info.cp_utf8.bytes, buffer+3, obj->info.cp_utf8.length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += obj->info.cp_utf8.length;
}
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_name_and_type_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_NAMEANDTYPE, tag, sz, "RBinJavaCPTypeNameAndType" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->info.cp_name_and_type.name_idx = R_BIN_JAVA_USHORT (buffer, 1);
obj->info.cp_name_and_type.descriptor_idx = R_BIN_JAVA_USHORT (buffer, 3);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_name_and_type_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 1;
//obj->info.cp_name_and_type.name_idx = R_BIN_JAVA_USHORT (buffer, 1);
size += 2;
//obj->info.cp_name_and_type.descriptor_idx = R_BIN_JAVA_USHORT (buffer, 3);
size += 2;
}
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_methodtype_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_METHODTYPE, tag, sz, "RBinJavaCPTypeMethodType" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->info.cp_method_type.descriptor_index = R_BIN_JAVA_USHORT (buffer, 1);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_methodtype_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
size += 1;
// obj->info.cp_method_type.descriptor_index = R_BIN_JAVA_USHORT (buffer, 1);
size += 2;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_methodhandle_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_METHODHANDLE, tag, sz, "RBinJavaCPTypeMethodHandle" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->info.cp_method_handle.reference_kind = buffer[1];
obj->info.cp_method_handle.reference_index = R_BIN_JAVA_USHORT (buffer, 2);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_methodhandle_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
size += 1;
//obj->info.cp_method_handle.reference_index = R_BIN_JAVA_USHORT (buffer, 2);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
return size;
}
R_API RBinJavaCPTypeObj* r_bin_java_invokedynamic_cp_new (RBinJavaObj *bin, ut8* buffer, ut64 sz) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag = buffer[0];
RBinJavaCPTypeObj *obj = NULL;
int quick_check = 0;
quick_check = r_bin_java_quick_check(R_BIN_JAVA_CP_INVOKEDYNAMIC, tag, sz, "RBinJavaCPTypeMethodHandle" );
if (quick_check > 0) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return obj;
}
obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj));
if (obj) {
memset (obj, 0, sizeof (RBinJavaCPTypeObj));
obj->metas = (RBinJavaMetaInfo *) malloc (sizeof (RBinJavaMetaInfo));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->metas->type_info = (void *)&R_BIN_JAVA_CP_METAS[tag];
obj->name = r_str_dup (NULL, (const char *) R_BIN_JAVA_CP_METAS[tag].name);;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj->tag = tag;
obj->info.cp_invoke_dynamic.bootstrap_method_attr_index = R_BIN_JAVA_USHORT (buffer, 1);
obj->info.cp_invoke_dynamic.name_and_type_index = R_BIN_JAVA_USHORT (buffer, 3);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return obj;
}
R_API ut64 r_bin_java_invokedynamic_cp_calc_size(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
size += 1;
//obj->info.cp_invoke_dynamic.bootstrap_method_attr_index = R_BIN_JAVA_USHORT (buffer, 1);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//obj->info.cp_invoke_dynamic.name_and_type_index = R_BIN_JAVA_USHORT (buffer, 3);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
return size;
}
// End new Constant Pool types
// Start free Constant Pool types
R_API void r_bin_java_default_free (RBinJavaCPTypeObj *obj) {
if(obj) {
if(obj->metas) free (obj->metas);
if(obj->name) free (obj->name);
if(obj->value) free (obj->value);
free (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_utf8_info_free (RBinJavaCPTypeObj *obj) {
if(obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(obj->metas)
free (obj->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (obj->info.cp_utf8.bytes)
free (obj->info.cp_utf8.bytes);
free (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
// Deallocs for type objects
R_API void r_bin_java_obj_free (RBinJavaCPTypeObj *obj) {
( (RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *.\n");
return;
}
((RBinJavaAttrMetas *) attr->metas->type_info)->allocs->print_summary (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_source_debug_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaSourceDebugExtensionAttr *.\n");
return;
}
printf ("Source Debug Extension Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Extension length: %d\n", attr->length);
printf (" Source Debug Extension value: \n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
for (i = 0; i < attr->length; i++) {
printf ("%c", attr->info.debug_extensions.debug_extension[i]);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
printf ("\n Source Debug Extension End\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_unknown_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Unknown.\n");
return;
}
printf ("Unknown Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_code_exceptions_attr_summary(RBinJavaExceptionEntry *exc_entry) {
if (exc_entry == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaExceptionEntry *.\n");
return;
}
printf (" Exception Table Entry Information\n");
printf (" offset: 0x%08"PFMT64x"\n", exc_entry->file_offset);
printf (" catch_type: %d\n", exc_entry->catch_type);
printf (" start_pc: 0x%04x\n", exc_entry->start_pc);
printf (" end_pc: 0x%04x\n", exc_entry->end_pc);
printf (" handler_pc: 0x%04x\n", exc_entry->handler_pc);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
// End free Constant Pool types
R_API void r_bin_java_print_code_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
2013-09-14 12:04:08 +00:00
RBinJavaExceptionEntry* exc_entry = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrInfo *_attr = NULL;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Code.\n");
return;
}
printf ("Code Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d, Attribute Count: %d\n", attr->length, attr->info.code_attr.attributes_count);
printf (" Max Stack: %d\n", attr->info.code_attr.max_stack);
printf (" Max Locals: %d\n", attr->info.code_attr.max_locals);
printf (" Code Length: %d\n", attr->info.code_attr.code_length);
printf (" Code At Offset: 0x%08"PFMT64x"\n", (ut64)attr->info.code_attr.code_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf ("Code Attribute Exception table information:\n");
printf (" Exception table length: %d\n",attr->info.code_attr.exception_table_length);
if(attr->info.code_attr.exception_table) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// Delete the attr entries
r_list_foreach_safe (attr->info.code_attr.exception_table, iter, iter_tmp, exc_entry) {
r_bin_java_print_code_exceptions_attr_summary (exc_entry);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
printf (" Implicit Method Stack Frame: \n");
r_bin_java_print_stack_map_frame_summary (attr->info.code_attr.implicit_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf ("Code Attribute Attributes information:\n");
if(attr->info.code_attr.attributes && attr->info.code_attr.attributes_count > 0) {
printf (" Code Attribute Attributes count: %d\n",attr->info.code_attr.attributes_count);
r_list_foreach_safe (attr->info.code_attr.attributes, iter, iter_tmp, _attr) {
r_bin_java_print_attr_summary (_attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
R_API void r_bin_java_print_constant_value_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *ConstantValue.\n");
return;
}
printf ("Constant Value Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" ConstantValue Index: %d\n", attr->info.constant_value_attr.constantvalue_idx);
}
R_API void r_bin_java_print_deprecated_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Deperecated.\n");
return;
}
printf ("Deperecated Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
}
R_API void r_bin_java_print_enclosing_methods_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Deperecated.\n");
return;
}
printf ("Enclosing Method Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" Class Info Index : 0x%02x\n", attr->info.enclosing_method_attr.class_idx);
printf (" Method Name and Type Index : 0x%02x\n", attr->info.enclosing_method_attr.method_idx);
printf (" Class Name : %s\n", attr->info.enclosing_method_attr.class_name);
printf (" Method Name and Desc : %s %s\n", attr->info.enclosing_method_attr.method_name, attr->info.enclosing_method_attr.method_descriptor);
}
R_API void r_bin_java_print_exceptions_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Exceptions.\n");
return;
}
printf ("Exceptions Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
for (i = 0; i < attr->length; i++) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Exceptions Attribute Index[%d]: %d\n", i, attr->info.exceptions_attr.exception_idx_table[i]);
}
}
R_API void r_bin_java_print_classes_attr_summary(RBinJavaClassesAttribute *icattr) {
if (icattr == NULL) {
2013-09-14 12:04:08 +00:00
eprintf ("Attempting to print an invalid RBinJavaClassesAttribute* (InnerClasses element).\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return;
}
printf (" Inner Classes Class Attribute Offset: 0x%08"PFMT64x"\n", icattr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Inner Classes Class Attribute Class Name (%d): %s\n", icattr->inner_name_idx, icattr->name);
printf (" Inner Classes Class Attribute Class inner_class_info_idx: %d\n", icattr->inner_class_info_idx);
printf (" Inner Classes Class Attribute Class inner_class_access_flags: 0x%02x %s\n", icattr->inner_class_access_flags, icattr->flags_str);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Inner Classes Class Attribute Class outer_class_info_idx: %d\n", icattr->outer_class_info_idx);
printf (" Inner Classes Class Field Information:\n");
r_bin_java_print_field_summary (icattr->clint_field);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Inner Classes Class Field Information:\n");
r_bin_java_print_field_summary (icattr->clint_field);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Inner Classes Class Attr Info Information:\n");
r_bin_java_print_attr_summary (icattr->clint_attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_inner_classes_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaClassesAttribute *icattr;
RListIter *iter, *iter_tmp;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *InnerClasses.\n");
return;
}
printf ("Inner Classes Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
r_list_foreach_safe (attr->info.inner_classes_attr.classes, iter, iter_tmp, icattr) {
r_bin_java_print_classes_attr_summary (icattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_line_number_attr_summary(RBinJavaLineNumberAttribute *lnattr) {
if (lnattr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaLineNumberAttribute *.\n");
return;
}
printf (" Line Number Attribute offset: 0x%08"PFMT64x"\n", lnattr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Line Number Attribute start_pc: %d\n", lnattr->start_pc);
printf (" Line Number Attribute line_number: %d\n", lnattr->line_number);
}
R_API void r_bin_java_print_line_number_table_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLineNumberAttribute *lnattr;
RListIter *iter, *iter_tmp;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *LineNumberTable.\n");
return;
}
printf ("Line Number Table Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
r_list_foreach_safe (attr->info.line_number_table_attr.line_number_table, iter, iter_tmp, lnattr) {
r_bin_java_print_line_number_attr_summary (lnattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_local_variable_attr_summary(RBinJavaLocalVariableAttribute *lvattr) {
if (lvattr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaLocalVariableAttribute *.\n");
return;
}
printf (" Local Variable Attribute offset: 0x%08"PFMT64x"\n", lvattr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Local Variable Attribute start_pc: %d\n", lvattr->start_pc);
printf (" Local Variable Attribute length: %d\n", lvattr->length);
printf (" Local Variable Attribute name_idx: %d\n", lvattr->name_idx);
printf (" Local Variable Attribute name: %s\n", lvattr->name);
printf (" Local Variable Attribute descriptor_idx: %d\n", lvattr->descriptor_idx);
printf (" Local Variable Attribute descriptor: %s\n", lvattr->descriptor);
printf (" Local Variable Attribute index: %d\n", lvattr->index);
}
R_API void r_bin_java_print_local_variable_table_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLocalVariableAttribute *lvattr;
RListIter *iter, *iter_tmp;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *LocalVariableTable.\n");
return;
}
printf ("Local Variable Table Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
r_list_foreach_safe (attr->info.local_variable_table_attr.local_variable_table, iter, iter_tmp, lvattr) {
r_bin_java_print_local_variable_attr_summary (lvattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_local_variable_type_attr_summary(RBinJavaLocalVariableTypeAttribute *lvattr) {
if (lvattr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaLocalVariableTypeAttribute *.\n");
return;
}
printf (" Local Variable Type Attribute offset: 0x%08"PFMT64x"\n", lvattr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Local Variable Type Attribute start_pc: %d\n", lvattr->start_pc);
printf (" Local Variable Type Attribute length: %d\n", lvattr->length);
printf (" Local Variable Type Attribute name_idx: %d\n", lvattr->name_idx);
printf (" Local Variable Type Attribute name: %s\n", lvattr->name);
printf (" Local Variable Type Attribute signature_idx: %d\n", lvattr->signature_idx);
printf (" Local Variable Type Attribute signature: %s\n", lvattr->signature);
printf (" Local Variable Type Attribute index: %d\n", lvattr->index);
}
R_API void r_bin_java_print_local_variable_type_table_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaLocalVariableTypeAttribute *lvtattr;
RListIter *iter, *iter_tmp;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *LocalVariableTable.\n");
return;
}
printf ("Local Variable Type Table Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
r_list_foreach_safe (attr->info.local_variable_type_table_attr.local_variable_table, iter, iter_tmp, lvtattr) {
r_bin_java_print_local_variable_type_attr_summary (lvtattr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_signature_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *SignatureAttr.\n");
return;
}
printf ("Signature Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" Signature UTF8 Index: %d\n", attr->info.signature_attr.signature_idx);
printf (" Signature string: %s\n", attr->info.signature_attr.signature);
}
R_API void r_bin_java_print_source_code_file_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *SourceFile.\n");
return;
}
printf ("Source File Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" Source File Index: %d\n", attr->info.source_file_attr.sourcefile_idx);
}
R_API void r_bin_java_print_synthetic_attr_summary(RBinJavaAttrInfo *attr) {
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Synthetic.\n");
return;
}
printf ("Synthetic Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" Attribute Index: %d\n", attr->info.source_file_attr.sourcefile_idx);
}
R_API void r_bin_java_print_stack_map_table_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RList *ptrList;
RBinJavaStackMapFrame *frame;
if(attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaStackMapTableAttr* .\n");
return;
}
printf ("StackMapTable Attribute information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" StackMapTable Method Code Size: 0x%08x\n", attr->info.stack_map_table_attr.code_size);
printf (" StackMapTable Frame Entries: 0x%08x\n", attr->info.stack_map_table_attr.number_of_entries);
printf (" StackMapTable Frames:\n");
ptrList = attr->info.stack_map_table_attr.stack_map_frame_entries;
if (ptrList) {
r_list_foreach_safe (ptrList, iter, iter_tmp, frame) {
r_bin_java_print_stack_map_frame_summary (frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
R_API void r_bin_java_print_stack_map_append_frame_summary(RBinJavaStackMapFrame *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RList *ptrList;
RBinJavaVerificationObj *ver_obj;
printf ("Stack Map Frame Information\n");
printf (" Tag Value = 0x%02x Name: %s\n", obj->tag, ((RBinJavaStackMapFrameMetas *) obj->metas->type_info)->name);
printf (" Offset: 0x%08"PFMT64x"\n", obj->file_offset);
printf (" Local Variable Count = 0x%04x\n", obj->number_of_locals);
printf (" Local Variables:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ptrList = obj->local_items;
r_list_foreach_safe (ptrList, iter, iter_tmp, ver_obj) {
r_bin_java_print_verification_info_summary (ver_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
printf (" Stack Items Count = 0x%04x\n", obj->number_of_stack_items);
printf (" Stack Items:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ptrList = obj->stack_items;
r_list_foreach_safe (ptrList, iter, iter_tmp, ver_obj) {
r_bin_java_print_verification_info_summary (ver_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_stack_map_frame_summary(RBinJavaStackMapFrame *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RList *ptrList;
RBinJavaVerificationObj *ver_obj;
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaStackMapFrame* .\n");
return;
}
printf ("Stack Map Frame Information\n");
printf (" Tag Value = 0x%02x Name: %s\n", obj->tag, ((RBinJavaStackMapFrameMetas *) obj->metas->type_info)->name);
printf (" Offset: 0x%08"PFMT64x"\n", obj->file_offset);
printf (" Local Variable Count = 0x%04x\n", obj->number_of_locals);
printf (" Stack Items Count = 0x%04x\n", obj->number_of_stack_items);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Local Variables:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ptrList = obj->local_items;
r_list_foreach_safe (ptrList, iter, iter_tmp, ver_obj) {
r_bin_java_print_verification_info_summary (ver_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
printf (" Stack Items:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ptrList = obj->stack_items;
r_list_foreach_safe (ptrList, iter, iter_tmp, ver_obj) {
r_bin_java_print_verification_info_summary (ver_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_verification_info_summary(RBinJavaVerificationObj *obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 tag_value = R_BIN_JAVA_STACKMAP_UNKNOWN;
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaVerificationObj* .\n");
return;
}
if (obj->tag < R_BIN_JAVA_STACKMAP_UNKNOWN)
tag_value = obj->tag;
printf ("Verification Information\n");
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Tag Value = 0x%02x\n", obj->tag);
printf (" Name = %s\n", R_BIN_JAVA_VERIFICATION_METAS[tag_value].name);
if (obj->tag == R_BIN_JAVA_STACKMAP_OBJECT) {
printf (" Object Constant Pool Index = 0x%x\n", obj->info.obj_val_cp_idx);
}else if(obj->tag == R_BIN_JAVA_STACKMAP_UNINIT) {
printf (" Uninitialized Object offset in code = 0x%x\n", obj->info.uninit_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_field_summary(RBinJavaField *field) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrInfo *attr;
RListIter *iter, *iter_tmp;
if (field == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaField* Field.\n");
return;
}
if(field && field->type == R_BIN_JAVA_FIELD_TYPE_METHOD) {
r_bin_java_print_method_summary (field);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return;
}/*else if(field && field->type == R_BIN_JAVA_FIELD_TYPE_INTERFACE) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_bin_java_print_interface_summary(field);
return;
}*/
printf ("Field Summary Information:\n");
printf (" File offset: 0x%08"PFMT64x"", field->file_offset);
printf (" Access Flags: %d\n", field->flags);
printf (" Name Index: %d (%s)\n", field->name_idx, field->name);
printf (" Descriptor Index: %d (%s)\n", field->descriptor_idx, field->descriptor);
printf (" Access Flags: 0x%02x (%s)\n", field->flags, field->flags_str);
printf (" Field Attributes Count: %d\n", field->attr_count);
printf (" Field Attributes:\n");
r_list_foreach_safe (field->attributes, iter, iter_tmp, attr) {
r_bin_java_print_attr_summary (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_method_summary(RBinJavaField *field) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrInfo *attr;
RListIter *iter, *iter_tmp;
if (field == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaField* Method.\n");
return;
}
printf ("Method Summary Information:\n");
printf (" File offset: 0x%08"PFMT64x"", field->file_offset);
printf (" Access Flags: %d\n", field->flags);
printf (" Name Index: %d (%s)\n", field->name_idx, field->name);
printf (" Descriptor Index: %d (%s)\n", field->descriptor_idx, field->descriptor);
printf (" Access Flags: 0x%02x (%s)\n", field->flags, field->flags_str);
printf (" Method Attributes Count: %d\n", field->attr_count);
printf (" Method Attributes:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_list_foreach_safe (field->attributes, iter, iter_tmp, attr) {
r_bin_java_print_attr_summary (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
/*
R_API void r_bin_java_print_interface_summary(ut16 idx) {//RBinJavaField *field) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAttrInfo *attr;
RBinJavaCPTypeObj *class_info;
RListIter *iter, *iter_tmp;
if (field == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaField* Interface.\n");
return;
}
printf ("Interface Summary Information:\n");
printf (" File offset: 0x%08"PFMT64x"", field->file_offset);
printf (" Access Flags: %d\n", field->flags);
printf (" Name Index: %d (%s)\n", field->name_idx, field->name);
printf (" Descriptor Index: %d (%s)\n", field->descriptor_idx, field->descriptor);
printf (" Interface Attributes Count: %d\n", field->attr_count);
printf (" Interface Attributes:\n");
r_list_foreach_safe (field->attributes, iter, iter_tmp, attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_bin_java_print_attr_summary(attr);
}
}
*/
R_API void r_bin_java_print_interfacemethodref_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* InterfaceMethodRef.\n");
return;
}
printf ("InterfaceMethodRef ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Class Index = %d\n", obj->info.cp_interface.class_idx);
printf (" Name and type Index = %d\n", obj->info.cp_interface.name_and_type_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_interfacemethodref_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_interface.class_idx, obj->info.cp_interface.name_and_type_idx);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_interface.class_idx, obj->info.cp_interface.name_and_type_idx);
}
}
}
return value;
}
R_API void r_bin_java_print_methodhandle_cp_summary(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 ref_kind;
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeMethodHandle.\n");
return;
}
ref_kind = obj->info.cp_method_handle.reference_kind;
printf ("MethodHandle ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Reference Kind = (0x%02x) %s\n", ref_kind, R_BIN_JAVA_REF_METAS[ref_kind].name);
printf (" Reference Index = %d\n", obj->info.cp_method_handle.reference_index);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_methodhandle_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
ut8 ref_kind = ref_kind = obj->info.cp_method_handle.reference_kind;
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%s.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
R_BIN_JAVA_REF_METAS[ref_kind].name, obj->info.cp_method_handle.reference_index);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%s.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
R_BIN_JAVA_REF_METAS[ref_kind].name, obj->info.cp_method_handle.reference_index);
}
}
}
return value;
}
R_API void r_bin_java_print_methodtype_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeMethodType.\n");
return;
}
printf ("MethodType ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Descriptor Index = 0x%02x\n", obj->info.cp_method_type.descriptor_index);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_methodtype_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_method_type.descriptor_index);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_method_type.descriptor_index);
}
}
}
return value;
}
R_API void r_bin_java_print_invokedynamic_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeInvokeDynamic.\n");
return;
}
printf ("InvokeDynamic ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Bootstrap Method Attr Index = (0x%02x)\n", obj->info.cp_invoke_dynamic.bootstrap_method_attr_index);
printf (" Bootstrap Name and Type Index = (0x%02x)\n", obj->info.cp_invoke_dynamic.name_and_type_index);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_invokedynamic_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_invoke_dynamic.bootstrap_method_attr_index,
obj->info.cp_invoke_dynamic.name_and_type_index);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_invoke_dynamic.bootstrap_method_attr_index,
obj->info.cp_invoke_dynamic.name_and_type_index);
}
}
}
return value;
}
R_API void r_bin_java_print_methodref_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* MethodRef.\n");
return;
}
printf ("MethodRef ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Class Index = %d\n", obj->info.cp_method.class_idx);
printf (" Name and type Index = %d\n", obj->info.cp_method.name_and_type_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_methodref_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_method.class_idx,
obj->info.cp_method.name_and_type_idx);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_method.class_idx,
obj->info.cp_method.name_and_type_idx);
}
}
}
return value;
}
R_API void r_bin_java_print_fieldref_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* FieldRef.\n");
return;
}
printf ("FieldRef ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Class Index = %d\n", obj->info.cp_field.class_idx);
printf (" Name and type Index = %d\n", obj->info.cp_field.name_and_type_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_fieldref_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_field.class_idx,
obj->info.cp_field.name_and_type_idx);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_field.class_idx,
obj->info.cp_field.name_and_type_idx);
}
}
}
return value;
}
R_API void r_bin_java_print_classref_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* ClassRef.\n");
return;
}
printf ("ClassRef ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" Name Index = %d\n", obj->info.cp_class.name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_classref_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_class.name_idx);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_class.name_idx);
}
}
}
return value;
}
R_API void r_bin_java_print_string_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* String.\n");
return;
}
printf ("String ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" String Index = %d\n", obj->info.cp_string.string_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_string_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_string.string_idx);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d",
obj->metas->ord, obj->file_offset,
((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_string.string_idx);
}
}
}
return value;
}
R_API void r_bin_java_print_integer_cp_summary(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 *b = NULL;
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* Integer.\n");
return;
}
b = obj->info.cp_integer.bytes.raw;
printf ("Integer ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" bytes = %02x %02x %02x %02x\n", b[0], b[1], b[2], b[3]);
printf (" integer = %d\n", R_BIN_JAVA_UINT (obj->info.cp_integer.bytes.raw, 0));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_integer_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.0x%08x",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
R_BIN_JAVA_UINT (obj->info.cp_integer.bytes.raw, 0));
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.0x%08x",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
R_BIN_JAVA_UINT (obj->info.cp_integer.bytes.raw, 0));
}
}
}
return value;
}
R_API void r_bin_java_print_float_cp_summary(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 *b = NULL;
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* Double.\n");
return;
}
b = obj->info.cp_float.bytes.raw;
printf ("Float ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" bytes = %02x %02x %02x %02x\n", b[0], b[1], b[2], b[3]);
printf (" float = %f\n", R_BIN_JAVA_FLOAT(obj->info.cp_float.bytes.raw, 0));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_float_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%f",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
R_BIN_JAVA_FLOAT(obj->info.cp_float.bytes.raw, 0));
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%f",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
R_BIN_JAVA_FLOAT(obj->info.cp_float.bytes.raw, 0));
}
}
}
return value;
}
R_API void r_bin_java_print_long_cp_summary(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 *b = NULL;
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* Long.\n");
return;
}
b = obj->info.cp_long.bytes.raw;
printf ("Long ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" High-bytes = %02x %02x %02x %02x\n", b[0], b[1], b[2], b[3]);
printf (" Low-bytes = %02x %02x %02x %02x\n", b[4], b[5], b[6], b[7]);
printf (" long = %08"PFMT64x"\n", rbin_java_raw_to_long(obj->info.cp_long.bytes.raw, 0));
}
R_API char * r_bin_java_print_long_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
2013-12-25 01:03:29 +00:00
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.0x%08"PFMT64x"",
obj->metas->ord,
obj->file_offset,
((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
rbin_java_raw_to_long(obj->info.cp_long.bytes.raw, 0));
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
2013-12-25 01:03:29 +00:00
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.0x%08"PFMT64x"",
obj->metas->ord,
obj->file_offset,
((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
rbin_java_raw_to_long(obj->info.cp_long.bytes.raw, 0));
}
}
}
return value;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_double_cp_summary(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut8 *b = NULL;
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* Double.\n");
return;
}
b = obj->info.cp_double.bytes.raw;
printf ("Double ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" High-bytes = %02x %02x %02x %02x\n", b[0], b[1], b[2], b[3]);
printf (" Low-bytes = %02x %02x %02x %02x\n", b[4], b[5], b[6], b[7]);
printf (" double = %f\n", rbin_java_raw_to_double (obj->info.cp_double.bytes.raw, 0));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_double_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset(value, 0, size);
2013-12-25 01:03:29 +00:00
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%f",
obj->metas->ord,
obj->file_offset,
((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
rbin_java_raw_to_double (obj->info.cp_double.bytes.raw, 0));
if (consumed >= size-1) {
free (value);
size += size >> 1;
value = malloc (size);
if (value) {
memset (value, 0, size);
2013-12-25 01:03:29 +00:00
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%f",
obj->metas->ord,
obj->file_offset,
((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
rbin_java_raw_to_double (obj->info.cp_double.bytes.raw, 0));
}
}
}
return value;
}
R_API void r_bin_java_print_name_and_type_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* Name_And_Type.\n");
return;
}
printf ("Name_And_Type ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" name_idx = (%d)\n", obj->info.cp_name_and_type.name_idx);
printf (" descriptor_idx = (%d)\n", obj->info.cp_name_and_type.descriptor_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_name_and_type_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * value = malloc(size);
if (value) {
memset (value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_name_and_type.name_idx,
obj->info.cp_name_and_type.descriptor_idx);
if (consumed >= size-1) {
free (value);
size += size >> 1;
value = malloc (size);
if (value) {
memset (value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%d",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_name_and_type.name_idx,
obj->info.cp_name_and_type.descriptor_idx);
}
}
}
return value;
}
R_API void r_bin_java_print_utf8_cp_summary(RBinJavaCPTypeObj* obj) {
if(obj == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* Utf8.\n");
return;
}
printf ("UTF8 ConstantPool Type (%d) ", obj->metas->ord);
printf (" Offset: 0x%08"PFMT64x"", obj->file_offset);
printf (" length = %d\n", obj->info.cp_utf8.length);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// XXX - TODO UTF8 Interpretation
printf (" strlen(%lu) utf8 = %s\n", strlen ( (const char *) obj->info.cp_utf8.bytes) ,(char *) obj->info.cp_utf8.bytes);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API char * r_bin_java_print_utf8_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char * utf8_str = r_hex_bin2strdup(obj->info.cp_utf8.bytes, obj->info.cp_utf8.length);
char * value = malloc(size + strlen(utf8_str));
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%s",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_utf8.length,
utf8_str);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size + strlen(utf8_str));
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s.%d.%s",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_utf8.length,
utf8_str);
}
}
}
2013-12-25 01:03:29 +00:00
free(utf8_str);
return value;
}
R_API void r_bin_java_print_null_cp_summary(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf ("Unknown ConstantPool Type Tag: 0x%04x .\n", obj->tag);
}
R_API char * r_bin_java_print_null_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char *value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name);
if (consumed >= size-1) {
free(value);
size += size >> 1;
value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s",
obj->metas->ord, obj->file_offset,
((RBinJavaCPTypeMetas *) obj->metas->type_info)->name);
}
}
}
return value;
}
R_API void r_bin_java_print_unknown_cp_summary(RBinJavaCPTypeObj* obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf ("NULL ConstantPool Type.\n");
}
R_API char * r_bin_java_print_unknown_cp_stringify(RBinJavaCPTypeObj* obj) {
ut32 size = 255, consumed = 0;
char *value = malloc(size);
if (value) {
memset(value, 0, size);
consumed = snprintf(value, size, "%d.0x%04"PFMT64x".%s",
obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name);
}
return value;
}
R_API void r_bin_java_stack_frame_default_free (RBinJavaStackMapFrame *stack_frame) {
if(stack_frame) {
if (stack_frame->metas) {
//((RBinJavaStackMapFrameMetas *) attr->metas->type_info)->allocs->delete_obj (stack_frame);
free (stack_frame->metas);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame->metas = NULL;
}
free (stack_frame);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
stack_frame = NULL;
}
}
R_API void r_bin_java_stack_frame_do_nothing_free (RBinJavaStackMapFrame *stack_frame) {}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
R_API void r_bin_java_stack_frame_do_nothing_new (RBinJavaObj *bin, RBinJavaStackMapFrame *stack_frame, ut64 offset) {}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
R_API RBinJavaElementValuePair* r_bin_java_element_pair_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaElementValuePair *ev_pair = NULL;
ut64 offset = 0;
ev_pair = (RBinJavaElementValuePair *) malloc (sizeof (RBinJavaElementValuePair));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (ev_pair == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf ev_pair failed to allocate
return ev_pair;
}
// TODO: What is the signifigance of ev_pair element
ev_pair->element_name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
ev_pair->file_offset = buf_offset;
ev_pair->name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, ev_pair->element_name_idx);
if (ev_pair->name == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO: eprintf unable to find the name for the given index
}
ev_pair->value = r_bin_java_element_value_new (buffer+offset, sz-offset, buf_offset+offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += ev_pair->value->size;
ev_pair->size = offset;
return ev_pair;
}
R_API void r_bin_java_print_element_pair_summary(RBinJavaElementValuePair *ev_pair) {
if(ev_pair == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaElementValuePair *pair.\n");
return;
}
printf ("Element Value Pair information:\n");
printf (" EV Pair File Offset: 0x%08"PFMT64x"\n", ev_pair->file_offset);
printf (" EV Pair Element Name index: 0x%02x\n", ev_pair->element_name_idx);
printf (" EV Pair Element Name: %s\n", ev_pair->name);
printf (" EV Pair Element Value:\n");
r_bin_java_print_element_value_summary (ev_pair->value);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_element_value_summary(RBinJavaElementValue *element_value) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaCPTypeObj *obj;
RBinJavaElementValue *ev_element=NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
2013-09-14 12:04:08 +00:00
char* name;
if(ev_element == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaElementValuePair *pair.\n");
return;
}
name = ((RBinJavaElementValueMetas *)element_value->metas->type_info)->name;
printf ("Element Value information:\n");
printf (" EV Pair File Offset: 0x%08"PFMT64x"\n", element_value->file_offset);
printf (" EV Value Type (%d): %s\n", element_value->tag, name );
switch(element_value->tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
case R_BIN_JAVA_EV_TAG_BYTE:
case R_BIN_JAVA_EV_TAG_CHAR:
case R_BIN_JAVA_EV_TAG_DOUBLE:
case R_BIN_JAVA_EV_TAG_FLOAT:
case R_BIN_JAVA_EV_TAG_INT:
case R_BIN_JAVA_EV_TAG_LONG:
case R_BIN_JAVA_EV_TAG_SHORT:
case R_BIN_JAVA_EV_TAG_BOOLEAN:
printf (" EV Value Constant Value index: 0x%02x\n", element_value->value.const_value.const_value_idx);
printf (" EV Value Constant Value Information:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj = element_value->value.const_value.const_value_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->print_summary (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ENUM:
printf (" EV Value Enum Constant Value Const Name Index: 0x%02x\n", element_value->value.enum_const_value.const_name_idx);
printf (" EV Value Enum Constant Value Type Name Index: 0x%02x\n", element_value->value.enum_const_value.type_name_idx);
printf (" EV Value Enum Constant Value Const CP Information:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj = element_value->value.enum_const_value.const_name_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->print_summary (obj);
printf (" EV Value Enum Constant Value Type CP Information:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj = element_value->value.enum_const_value.type_name_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->print_summary (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_CLASS:
printf (" EV Value Class Info Index: 0x%02x\n", element_value->value.class_value.class_info_idx);
printf (" EV Value Class Info CP Information:\n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj = element_value->value.class_value.class_info_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->print_summary (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ARRAY:
printf (" EV Value Array Value Number of Values: 0x%04x\n", element_value->value.array_value.num_values);
printf (" EV Value Array Values\n");
r_list_foreach_safe (element_value->value.array_value.values, iter, iter_tmp, ev_element) {
r_bin_java_print_element_value_summary (ev_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
break;
case R_BIN_JAVA_EV_TAG_ANNOTATION:
printf (" EV Annotation Information:\n");
r_bin_java_print_annotation_summary (&element_value->value.annotation_value);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
default:
// eprintf unable to handle tag
break;
}
}
R_API void r_bin_java_element_pair_free (RBinJavaElementValuePair *ev_pair) {
if(ev_pair) {
if (ev_pair->name) {
free (ev_pair->name);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ev_pair->name = NULL;
}
if(ev_pair->value) {
r_bin_java_element_value_free (ev_pair->value);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ev_pair->value = NULL;
}
free (ev_pair);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
ev_pair = NULL;
}
R_API void r_bin_java_element_value_free (RBinJavaElementValue* element_value) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaCPTypeObj *obj = NULL;
RBinJavaElementValuePair *ev_pairs = NULL;
RBinJavaElementValue *ev_element = NULL;
if(element_value) {
switch(element_value->tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
case R_BIN_JAVA_EV_TAG_BYTE:
case R_BIN_JAVA_EV_TAG_CHAR:
case R_BIN_JAVA_EV_TAG_DOUBLE:
case R_BIN_JAVA_EV_TAG_FLOAT:
case R_BIN_JAVA_EV_TAG_INT:
case R_BIN_JAVA_EV_TAG_LONG:
case R_BIN_JAVA_EV_TAG_SHORT:
case R_BIN_JAVA_EV_TAG_BOOLEAN:
//Delete the CP Type Object
obj = element_value->value.const_value.const_value_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ENUM:
//Delete the CP Type Objects
obj = element_value->value.enum_const_value.const_name_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj = element_value->value.enum_const_value.type_name_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_CLASS:
//Delete the CP Type Object
obj = element_value->value.class_value.class_info_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ARRAY:
//Delete the Element Value array List
r_list_foreach_safe (element_value->value.array_value.values, iter, iter_tmp, ev_element) {
if (ev_element) {
r_bin_java_element_value_free (ev_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
// TODO eprintf ev_pairs value was NULL
}
r_list_delete (element_value->value.array_value.values, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ev_element = NULL;
}
r_list_free (element_value->value.array_value.values);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ANNOTATION:
//Delete the Annotations List
r_list_foreach_safe (element_value->value.annotation_value.element_value_pairs, iter, iter_tmp, ev_pairs) {
if (ev_pairs) {
r_bin_java_element_pair_free (ev_pairs);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
else{
// TODO eprintf ev_pairs value was NULL
}
r_list_delete (element_value->value.annotation_value.element_value_pairs, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ev_pairs = NULL;
}
r_list_free (element_value->value.annotation_value.element_value_pairs);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
default:
// eprintf unable to free the tag
break;
}
free (element_value);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API ut64 r_bin_java_annotation_default_attr_calc_size(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr) {
//attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
//attr->info.annotation_default_attr.default_value = r_bin_java_element_value_new (buffer+offset, sz-offset, buf_offset+offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += r_bin_java_element_value_calc_size(attr->info.annotation_default_attr.default_value);
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_annotation_default_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 offset = 0;
2013-09-14 12:04:08 +00:00
RBinJavaAttrInfo* attr = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if(attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_ANNOTATION_DEFAULT_ATTR;
attr->info.annotation_default_attr.default_value = r_bin_java_element_value_new (buffer+offset, sz-offset, buf_offset+offset);
if (attr->info.annotation_default_attr.default_value) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += attr->info.annotation_default_attr.default_value->size;
}
}
return attr;
}
R_API void r_bin_java_annotation_default_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaElementValuePair *ev_pairs = NULL;
2013-09-14 12:04:08 +00:00
RBinJavaElementValue* element_value = NULL, *ev_element = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaCPTypeObj *obj = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if (attr == NULL || attr->type != R_BIN_JAVA_ATTR_TYPE_ANNOTATION_DEFAULT_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return;
}
element_value = (attr->info.annotation_default_attr.default_value);
switch(element_value->tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
case R_BIN_JAVA_EV_TAG_BYTE:
case R_BIN_JAVA_EV_TAG_CHAR:
case R_BIN_JAVA_EV_TAG_DOUBLE:
case R_BIN_JAVA_EV_TAG_FLOAT:
case R_BIN_JAVA_EV_TAG_INT:
case R_BIN_JAVA_EV_TAG_LONG:
case R_BIN_JAVA_EV_TAG_SHORT:
case R_BIN_JAVA_EV_TAG_BOOLEAN:
//Delete the CP Type Object
obj = element_value->value.const_value.const_value_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ENUM:
//Delete the CP Type Objects
obj = element_value->value.enum_const_value.const_name_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
obj = element_value->value.enum_const_value.type_name_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_CLASS:
//Delete the CP Type Object
obj = element_value->value.class_value.class_info_cp_obj;
((RBinJavaCPTypeMetas *) obj->metas->type_info)->allocs->delete_obj (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ARRAY:
//Delete the Element Value array List
r_list_foreach_safe (element_value->value.array_value.values, iter, iter_tmp, ev_element) {
if (ev_element) {
r_bin_java_element_value_free (ev_element);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
// TODO eprintf ev_pairs value was NULL
}
r_list_delete (element_value->value.array_value.values, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ev_element = NULL;
}
r_list_free (element_value->value.array_value.values);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ANNOTATION:
//Delete the Annotations List
r_list_foreach_safe (element_value->value.annotation_value.element_value_pairs, iter, iter_tmp, ev_pairs) {
if (ev_pairs) {
r_bin_java_element_pair_free (ev_pairs);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
else{
// TODO eprintf ev_pairs value was NULL
}
r_list_delete (element_value->value.annotation_value.element_value_pairs, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ev_pairs = NULL;
}
r_list_free (element_value->value.annotation_value.element_value_pairs);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
default:
// eprintf unable to free the tag
break;
}
}
R_API RBinJavaAnnotation* r_bin_java_annotation_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
RBinJavaAnnotation *annotation = NULL;
RBinJavaElementValuePair *ev_pairs = NULL;
ut64 offset = 0;
annotation = (RBinJavaAnnotation *)malloc (sizeof (RBinJavaAnnotation));
if (annotation == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf annotation allocation failed
return NULL;
}
memset (annotation, 0, sizeof (RBinJavaAnnotation));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// (ut16) read and set annotation_value.type_idx;
annotation->type_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
// (ut16) read and set annotation_value.num_element_value_pairs;
annotation->num_element_value_pairs = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
annotation->element_value_pairs = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// read annotation_value.num_element_value_pairs, and append to annotation_value.element_value_pairs
for (i = 0; i < annotation->num_element_value_pairs; i++) {
ev_pairs = r_bin_java_element_pair_new (buffer+offset, sz-offset, buf_offset+offset);
if(ev_pairs == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO: eprintf error when reading element pair
}
if (ev_pairs) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += ev_pairs->size;
}
r_list_append (annotation->element_value_pairs, (void *) ev_pairs);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
annotation->size = offset;
return annotation;
}
R_API ut64 r_bin_java_annotation_calc_size(RBinJavaAnnotation* annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 sz = 0;
RListIter *iter, *iter_tmp;
RBinJavaElementValuePair *ev_pairs = NULL;
if (annotation == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return sz;
}
//annotation->type_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
sz += 2;
//annotation->num_element_value_pairs = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
sz += 2;
r_list_foreach_safe (annotation->element_value_pairs, iter, iter_tmp, ev_pairs) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (ev_pairs)
sz += r_bin_java_element_pair_calc_size(ev_pairs);
}
return sz;
}
R_API void r_bin_java_annotation_free (RBinJavaAnnotation *annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaElementValuePair *ev_pairs = NULL;
if (annotation) {
if(annotation->element_value_pairs) {
r_list_foreach_safe (annotation->element_value_pairs, iter, iter_tmp, ev_pairs) {
if (ev_pairs) {
r_bin_java_element_pair_free (ev_pairs);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
else{
// TODO eprintf ev_pairs value was NULL
}
r_list_delete (annotation->element_value_pairs, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ev_pairs = NULL;
}
r_list_free (annotation->element_value_pairs);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
free (annotation);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_annotation_summary(RBinJavaAnnotation *annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaElementValuePair *ev_pair = NULL;
if (annotation == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf invalid annotation
return;
}
printf (" Annotation Type Index: 0x%02x\n", annotation->type_idx);
printf (" Annotation Number of EV Pairs: 0x%04x\n", annotation->num_element_value_pairs);
printf (" Annotation EV Pair Values:\n");
if(annotation->element_value_pairs) {
r_list_foreach_safe (annotation->element_value_pairs, iter, iter_tmp, ev_pair) {
r_bin_java_print_element_pair_summary (ev_pair);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
R_API ut64 r_bin_java_element_pair_calc_size(RBinJavaElementValuePair *ev_pair) {
ut64 sz = 0;
if (ev_pair == NULL)
return sz;
//ev_pair->element_name_idx = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
//ev_pair->value = r_bin_java_element_value_new (bin, offset+2);
if (ev_pair->value)
sz += r_bin_java_element_value_calc_size(ev_pair->value);
return sz;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API ut64 r_bin_java_element_value_calc_size(RBinJavaElementValue *element_value) {
RListIter *iter, *iter_tmp;
RBinJavaElementValue* ev_element;
RBinJavaElementValuePair *ev_pairs;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 sz = 0;
if (element_value == NULL)
return sz;
// tag
sz += 1;
switch(element_value->tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
case R_BIN_JAVA_EV_TAG_BYTE:
case R_BIN_JAVA_EV_TAG_CHAR:
case R_BIN_JAVA_EV_TAG_DOUBLE:
case R_BIN_JAVA_EV_TAG_FLOAT:
case R_BIN_JAVA_EV_TAG_INT:
case R_BIN_JAVA_EV_TAG_LONG:
case R_BIN_JAVA_EV_TAG_SHORT:
case R_BIN_JAVA_EV_TAG_BOOLEAN:
// look up value in bin->cp_list
// (ut16) read and set const_value.const_value_idx
//element_value->value.const_value.const_value_idx = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
break;
case R_BIN_JAVA_EV_TAG_ENUM:
// (ut16) read and set enum_const_value.type_name_idx
//element_value->value.enum_const_value.type_name_idx = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
// (ut16) read and set enum_const_value.const_name_idx
//element_value->value.enum_const_value.const_name_idx = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
break;
case R_BIN_JAVA_EV_TAG_CLASS:
// (ut16) read and set class_value.class_info_idx
//element_value->value.class_value.class_info_idx = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
break;
case R_BIN_JAVA_EV_TAG_ARRAY:
// (ut16) read and set array_value.num_values
//element_value->value.array_value.num_values = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
r_list_foreach_safe (element_value->value.array_value.values, iter, iter_tmp, ev_element) {
if (ev_element) {
sz += r_bin_java_element_value_calc_size(ev_element);
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ANNOTATION:
// annotation new is not used here.
// (ut16) read and set annotation_value.type_idx;
//element_value->value.annotation_value.type_idx = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
// (ut16) read and set annotation_value.num_element_value_pairs;
//element_value->value.annotation_value.num_element_value_pairs = r_bin_java_read_short(bin, bin->b->cur);
sz += 2;
element_value->value.annotation_value.element_value_pairs = r_list_new ();
r_list_foreach_safe (element_value->value.annotation_value.element_value_pairs, iter, iter_tmp, ev_pairs ) {
if (ev_pairs) {
sz += r_bin_java_element_pair_calc_size(ev_pairs);
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
default:
// eprintf unable to handle tag
break;
}
return sz;
}
R_API RBinJavaElementValue* r_bin_java_element_value_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
ut64 offset = 0;
RBinJavaElementValue* element_value = (RBinJavaElementValue *) malloc (sizeof (RBinJavaElementValue));
2013-09-14 12:04:08 +00:00
RBinJavaElementValuePair* ev_pairs = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// read element_value->tag
if(element_value == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// eprintf bad allocation
return element_value;
}
memset (element_value, 0, sizeof (RBinJavaElementValue));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->file_offset = buf_offset;
element_value->tag = buffer[offset];
element_value->size += 1;
offset += 1;
element_value->metas->type_info = (void *) r_bin_java_get_ev_meta_from_tag( element_value->tag);
switch(element_value->tag) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
case R_BIN_JAVA_EV_TAG_BYTE:
case R_BIN_JAVA_EV_TAG_CHAR:
case R_BIN_JAVA_EV_TAG_DOUBLE:
case R_BIN_JAVA_EV_TAG_FLOAT:
case R_BIN_JAVA_EV_TAG_INT:
case R_BIN_JAVA_EV_TAG_LONG:
case R_BIN_JAVA_EV_TAG_SHORT:
case R_BIN_JAVA_EV_TAG_BOOLEAN:
// look up value in bin->cp_list
// (ut16) read and set const_value.const_value_idx
element_value->value.const_value.const_value_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += 2;
offset += 2;
// look-up, deep copy, and set const_value.const_value_cp_obj
element_value->value.const_value.const_value_cp_obj = r_bin_java_clone_cp_idx (R_BIN_JAVA_GLOBAL_BIN, element_value->value.const_value.const_value_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ENUM:
// (ut16) read and set enum_const_value.type_name_idx
element_value->value.enum_const_value.type_name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += 2;
offset += 2;
// (ut16) read and set enum_const_value.const_name_idx
element_value->value.enum_const_value.const_name_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += 2;
offset += 2;
// look up type_name_index in bin->cp_list
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// look-up, deep copy, and set enum_const_value.const_name_cp_obj
element_value->value.enum_const_value.const_name_cp_obj = r_bin_java_clone_cp_idx (R_BIN_JAVA_GLOBAL_BIN, element_value->value.enum_const_value.const_name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// look-up, deep copy, and set enum_const_value.type_name_cp_obj
element_value->value.enum_const_value.type_name_cp_obj = r_bin_java_clone_cp_idx (R_BIN_JAVA_GLOBAL_BIN, element_value->value.enum_const_value.type_name_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_CLASS:
// (ut16) read and set class_value.class_info_idx
element_value->value.class_value.class_info_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += 2;
offset += 2;
// look up type_name_index in bin->cp_list
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// look-up, deep copy, and set class_value.class_info_cp_obj
element_value->value.class_value.class_info_cp_obj = r_bin_java_clone_cp_idx (R_BIN_JAVA_GLOBAL_BIN, element_value->value.class_value.class_info_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
case R_BIN_JAVA_EV_TAG_ARRAY:
// (ut16) read and set array_value.num_values
element_value->value.array_value.num_values = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += 2;
offset += 2;
element_value->value.array_value.values = r_list_new ();
for (i = 0; i < element_value->value.array_value.num_values; i++) {
RBinJavaElementValue* ev_element = r_bin_java_element_value_new (buffer+offset, sz-offset, buf_offset+offset);
if (ev_element) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += ev_element->size;
offset += ev_element->size;
}
// read array_value.num_values, and append to array_value.values
r_list_append (element_value->value.array_value.values, (void *) ev_element);
if (ev_element == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO: eprintf error when reading element value
}
}
break;
case R_BIN_JAVA_EV_TAG_ANNOTATION:
// annotation new is not used here.
// (ut16) read and set annotation_value.type_idx;
element_value->value.annotation_value.type_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += 2;
offset += 2;
// (ut16) read and set annotation_value.num_element_value_pairs;
element_value->value.annotation_value.num_element_value_pairs = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += 2;
offset += 2;
element_value->value.annotation_value.element_value_pairs = r_list_new ();
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// read annotation_value.num_element_value_pairs, and append to annotation_value.element_value_pairs
for (i = 0; i < element_value->value.annotation_value.num_element_value_pairs; i++) {
ev_pairs = r_bin_java_element_pair_new (buffer+offset, sz-offset, buf_offset+offset);
if (ev_pairs) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
element_value->size += ev_pairs->size;
offset += ev_pairs->size;
}
if(ev_pairs == NULL) {
// TODO: eprintf error when reading element pair
}
r_list_append (element_value->value.annotation_value.element_value_pairs, (void *) ev_pairs);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
break;
default:
// eprintf unable to handle tag
break;
}
return element_value;
}
R_API void r_bin_java_bootstrap_method_argument_free (RBinJavaBootStrapArgument *bsm_arg) {
if (bsm_arg) {
if (bsm_arg->argument_info_cp_obj) {
((RBinJavaCPTypeMetas *) bsm_arg->argument_info_cp_obj)->allocs->delete_obj (bsm_arg->argument_info_cp_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bsm_arg->argument_info_cp_obj = NULL;
}
free (bsm_arg);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_bootstrap_method_argument_summary(RBinJavaBootStrapArgument* bsm_arg) {
if(bsm_arg == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaBootStrapArgument *.\n");
return;
}
printf ("Bootstrap Method Argument Information:\n");
printf (" Offset: 0x%08"PFMT64x"", bsm_arg->file_offset);
printf (" Name_And_Type Index = (0x%02x)\n", bsm_arg->argument_info_idx);
if (bsm_arg->argument_info_cp_obj) {
printf (" Bootstrap Method Argument Type and Name Info:\n");
((RBinJavaCPTypeMetas *) bsm_arg->argument_info_cp_obj)->allocs->print_summary (bsm_arg->argument_info_cp_obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
else
printf (" Bootstrap Method Argument Type and Name Info: INVALID\n");
}
R_API void r_bin_java_print_bootstrap_method_summary(RBinJavaBootStrapMethod* bsm) {
2013-09-14 12:04:08 +00:00
RBinJavaBootStrapArgument* bsm_arg = NULL;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp=NULL;
if(bsm == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
eprintf ("Attempting to print an invalid RBinJavaBootStrapArgument *.\n");
return;
}
printf ("Bootstrap Method Information:\n");
printf (" Offset: 0x%08"PFMT64x"", bsm->file_offset);
printf (" Method Reference Index = (0x%02x)\n", bsm->bootstrap_method_ref);
printf (" Number of Method Arguments = (0x%02x)\n", bsm->num_bootstrap_arguments);
if (bsm->bootstrap_arguments) {
r_list_foreach_safe (bsm->bootstrap_arguments, iter, iter_tmp, bsm_arg) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(bsm_arg)
r_bin_java_print_bootstrap_method_argument_summary (bsm_arg);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
else
printf (" Bootstrap Method Argument: NONE \n");
}
R_API RBinJavaBootStrapArgument* r_bin_java_bootstrap_method_argument_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaBootStrapArgument *bsm_arg = NULL;
ut64 offset = 0;
bsm_arg = (RBinJavaBootStrapArgument *) malloc (sizeof (RBinJavaBootStrapArgument));
if (bsm_arg == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf failed to allocate bytes for bootstrap_method.
return bsm_arg;
}
memset (bsm_arg, 0, sizeof (RBinJavaBootStrapArgument));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bsm_arg->file_offset = buf_offset;
bsm_arg->argument_info_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
bsm_arg->argument_info_cp_obj = r_bin_java_clone_cp_idx (R_BIN_JAVA_GLOBAL_BIN, bsm_arg->argument_info_idx);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bsm_arg->size = offset;
return bsm_arg;
}
R_API void r_bin_java_bootstrap_method_free (RBinJavaBootStrapMethod *bsm) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaBootStrapArgument *obj = NULL;
if (bsm) {
if (bsm->bootstrap_arguments) {
r_list_foreach_safe (bsm->bootstrap_arguments, iter, iter_tmp, obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(obj)
r_bin_java_bootstrap_method_argument_free (obj);
r_list_delete (bsm->bootstrap_arguments, iter);
}
r_list_free (bsm->bootstrap_arguments);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bsm->bootstrap_arguments = NULL;
}
free (bsm);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API RBinJavaBootStrapMethod* r_bin_java_bootstrap_method_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaBootStrapMethod *bsm = NULL;
RBinJavaBootStrapArgument *bsm_arg = NULL;
ut32 i = 0;
ut64 offset = 0;
bsm = (RBinJavaBootStrapMethod *) malloc (sizeof (RBinJavaBootStrapMethod));
if (bsm == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf failed to allocate bytes for bootstrap_method.
return bsm;
}
memset (bsm, 0, sizeof (RBinJavaBootStrapMethod));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bsm->file_offset = buf_offset;
bsm->bootstrap_method_ref = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
bsm->num_bootstrap_arguments = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
bsm->bootstrap_arguments = r_list_new ();
for (i = 0; i < bsm->num_bootstrap_arguments; i++) {
//bsm_arg = r_bin_java_bootstrap_method_argument_new (bin, bin->b->cur);
bsm_arg = r_bin_java_bootstrap_method_argument_new (buffer+offset, sz-offset, buf_offset+offset);
if(bsm_arg) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += bsm_arg->size;
r_list_append (bsm->bootstrap_arguments, (void *) bsm_arg);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
// TODO eprintf Failed to read the %d boot strap method.
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
bsm->size = offset;
return bsm;
}
R_API void r_bin_java_print_bootstrap_methods_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaBootStrapMethod *obj = NULL;
if (attr == NULL || attr->type == R_BIN_JAVA_ATTR_TYPE_BOOTSTRAP_METHODS_ATTR) {
eprintf ("Unable to print attribue summary for RBinJavaAttrInfo *RBinJavaBootstrapMethodsAttr");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return;
}
printf ("Bootstrap Methods Attribute Information Information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"", attr->file_offset);
printf (" Length: 0x%08x", attr->length);
printf (" Number of Method Arguments = (0x%02x)\n", attr->info.bootstrap_methods_attr.num_bootstrap_methods);
if (attr->info.bootstrap_methods_attr.bootstrap_methods) {
r_list_foreach_safe (attr->info.bootstrap_methods_attr.bootstrap_methods, iter, iter_tmp, obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(obj)
r_bin_java_print_bootstrap_method_summary (obj);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}else{
printf (" Bootstrap Methods: NONE \n");
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_bootstrap_methods_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaBootStrapMethod *obj = NULL;
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_BOOTSTRAP_METHODS_ATTR) {
if (attr->info.bootstrap_methods_attr.bootstrap_methods) {
r_list_foreach_safe (attr->info.bootstrap_methods_attr.bootstrap_methods, iter, iter_tmp, obj) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(obj)
r_bin_java_bootstrap_method_free (obj);
r_list_delete (attr->info.bootstrap_methods_attr.bootstrap_methods, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.bootstrap_methods_attr.bootstrap_methods);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->info.bootstrap_methods_attr.bootstrap_methods = NULL;
}
free (attr);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API ut64 r_bin_java_bootstrap_methods_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaBootStrapMethod *bsm = NULL;
ut64 size = 0;
if (attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
//attr->info.bootstrap_methods_attr.num_bootstrap_methods = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (attr->info.bootstrap_methods_attr.bootstrap_methods, iter, iter_tmp, bsm) {
if(bsm) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += r_bin_java_bootstrap_method_calc_size(bsm);
}else{
// TODO eprintf Failed to read the %d boot strap method.
}
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return size;
}
R_API ut64 r_bin_java_bootstrap_arg_calc_size(RBinJavaBootStrapArgument *bsm_arg) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (bsm_arg) {
//bsm_arg->argument_info_idx = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
}
return size;
}
R_API ut64 r_bin_java_bootstrap_method_calc_size(RBinJavaBootStrapMethod *bsm) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter, *iter_tmp;
RBinJavaBootStrapArgument *bsm_arg = NULL;
ut64 size = 0;
if (bsm) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 6;
//bsm->bootstrap_method_ref = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
//bsm->num_bootstrap_arguments = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (bsm->bootstrap_arguments, iter, iter_tmp, bsm_arg) {
if(bsm_arg) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += r_bin_java_bootstrap_arg_calc_size(bsm_arg);
}else{
// TODO eprintf Failed to read the %d boot strap method.
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_bootstrap_methods_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
RBinJavaBootStrapMethod *bsm = NULL;
ut64 offset = 0;
RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if(attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_BOOTSTRAP_METHODS_ATTR;
attr->info.bootstrap_methods_attr.num_bootstrap_methods = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.bootstrap_methods_attr.bootstrap_methods = r_list_new ();
for (i = 0; i < attr->info.bootstrap_methods_attr.num_bootstrap_methods; i++) {
//bsm = r_bin_java_bootstrap_method_new (bin, bin->b->cur);
bsm = r_bin_java_bootstrap_method_new (buffer+offset, sz-offset, buf_offset+offset);
if(bsm) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += bsm->size;
r_list_append (attr->info.bootstrap_methods_attr.bootstrap_methods, (void *) bsm);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
// TODO eprintf Failed to read the %d boot strap method.
}
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->size = offset;
}
return attr;
}
R_API void r_bin_java_print_annotation_default_attr_summary(RBinJavaAttrInfo *attr) {
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_ANNOTATION_DEFAULT_ATTR) {
printf ("Annotation Default Attribute Information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
r_bin_java_print_element_value_summary ((attr->info.annotation_default_attr.default_value));
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}else{
// TODO: eprintf attr is invalid
}
}
R_API void r_bin_java_annotation_array_free (RBinJavaAnnotationsArray *annotation_array) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaAnnotation *annotation;
if (annotation_array->annotations == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return;
}
r_list_foreach_safe (annotation_array->annotations, iter, iter_tmp, annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (annotation)
r_bin_java_annotation_free (annotation);
r_list_delete (annotation_array->annotations, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (annotation_array->annotations);
free (annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
R_API void r_bin_java_print_annotation_array_summary(RBinJavaAnnotationsArray *annotation_array) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaAnnotation *annotation;
if (annotation_array->annotations == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return;
}
printf (" Annotation Array Information:\n");
printf (" Number of Annotation Array Elements: %d\n", annotation_array->num_annotations);
r_list_foreach_safe (annotation_array->annotations, iter, iter_tmp, annotation) {
r_bin_java_print_annotation_summary (annotation);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API RBinJavaAnnotationsArray* r_bin_java_annotation_array_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAnnotation *annotation;
RBinJavaAnnotationsArray *annotation_array;
ut32 i;
ut64 offset = 0;
annotation_array = (RBinJavaAnnotationsArray *) malloc (sizeof (RBinJavaAnnotationsArray));
if (annotation_array == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return NULL;
}
annotation_array->num_annotations = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
annotation_array->annotations = r_list_new ();
for (i=0; i < annotation_array->num_annotations; i++) {
annotation = r_bin_java_annotation_new (buffer+offset, sz-offset, buf_offset+offset);
if (annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += annotation->size;
}
if (annotation == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
}
r_list_append (annotation_array->annotations, (void *) annotation);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
annotation_array->size = offset;
return annotation_array;
}
R_API RBinJavaAttrInfo* r_bin_java_rtv_annotations_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
RBinJavaAttrInfo *attr = NULL;
ut64 offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if(attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_ANNOTATION_ATTR;
attr->info.annotation_array.num_annotations = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.annotation_array.annotations = r_list_new ();
for (i=0; i < attr->info.annotation_array.num_annotations; i++) {
RBinJavaAnnotation* annotation = r_bin_java_annotation_new (buffer+offset, sz-offset, buf_offset+offset);
if (annotation == NULL) {
}
if (annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += annotation->size;
}
r_list_append (attr->info.annotation_array.annotations, (void *) annotation);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->size = offset;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr;
}
R_API ut64 r_bin_java_annotation_array_calc_size(RBinJavaAnnotationsArray* annotation_array) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaAnnotation *annotation;
if (annotation_array->annotations == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf
return size;
}
//annotation_array->num_annotations = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += 2;
r_list_foreach_safe (annotation_array->annotations, iter, iter_tmp, annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += r_bin_java_annotation_calc_size(annotation);
}
return size;
}
R_API ut64 r_bin_java_rtv_annotations_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return size;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += (6 + r_bin_java_annotation_array_calc_size(&(attr->info.annotation_array)));
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_rti_annotations_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
RBinJavaAttrInfo *attr = NULL;
ut64 offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
if(attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_ANNOTATION_ATTR;
attr->info.annotation_array.num_annotations = R_BIN_JAVA_USHORT (buffer, offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 2;
attr->info.annotation_array.annotations = r_list_new ();
for (i=0; i < attr->info.rtv_annotations_attr.num_annotations; i++) {
RBinJavaAnnotation* annotation = r_bin_java_annotation_new (buffer+offset, sz-offset, buf_offset+offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (annotation)
offset += annotation->size;
r_list_append (attr->info.annotation_array.annotations, (void *) annotation);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->size = offset;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr;
}
R_API ut64 r_bin_java_rti_annotations_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return size;
}
size += (6 + r_bin_java_annotation_array_calc_size(&(attr->info.annotation_array)));
return size;
}
R_API void r_bin_java_rtv_annotations_attr_free (RBinJavaAttrInfo *attr) {
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_ANNOTATION_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaAnnotation *annotation;
if (attr->info.annotation_array.annotations) {
r_list_foreach_safe (attr->info.annotation_array.annotations, iter, iter_tmp, annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (annotation)
r_bin_java_annotation_free (annotation);
r_list_delete (attr->info.annotation_array.annotations, iter);
}
r_list_free (attr->info.annotation_array.annotations);
}
free (attr);
}
}
R_API void r_bin_java_rti_annotations_attr_free (RBinJavaAttrInfo *attr) {
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_ANNOTATION_ATTR) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaAnnotation *annotation;
if (attr->info.annotation_array.annotations) {
r_list_foreach_safe (attr->info.annotation_array.annotations, iter, iter_tmp, annotation) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (annotation)
r_bin_java_annotation_free (annotation);
r_list_delete (attr->info.annotation_array.annotations, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.annotation_array.annotations);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
free (attr);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_rtv_annotations_attr_summary(RBinJavaAttrInfo *attr) {
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_ANNOTATION_ATTR) {
printf ("Runtime Visible Annotations Attribute Information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
r_bin_java_print_annotation_array_summary (&attr->info.annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API void r_bin_java_print_rti_annotations_attr_summary(RBinJavaAttrInfo *attr) {
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_ANNOTATION_ATTR) {
printf ("Runtime Invisible Annotations Attribute Information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
r_bin_java_print_annotation_array_summary (&attr->info.annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
R_API ut64 r_bin_java_rtip_annotations_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaAnnotationsArray *annotation_array;
if (attr == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
// TODO eprintf allocation fail
return size;
}
//attr->info.rtip_annotations_attr.num_parameters = buffer[offset];
size += (6 + 1);
r_list_foreach_safe (attr->info.rtip_annotations_attr.parameter_annotations, iter, iter_tmp, annotation_array) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if(annotation_array)
size += r_bin_java_annotation_array_calc_size(annotation_array);
}
return size;
}
R_API RBinJavaAttrInfo* r_bin_java_rtip_annotations_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
RBinJavaAttrInfo *attr = NULL;
ut64 offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
RBinJavaAnnotationsArray *annotation_array;
if(attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATION_ATTR;
attr->info.rtip_annotations_attr.num_parameters = buffer[offset];
offset += 1;
attr->info.rtip_annotations_attr.parameter_annotations = r_list_new ();
for (i=0; i < attr->info.rtip_annotations_attr.num_parameters; i++) {
annotation_array = r_bin_java_annotation_array_new (buffer+offset, sz-offset, buf_offset+offset);
if (annotation_array == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
if (annotation_array)
offset += annotation_array->size;
r_list_append (attr->info.rtip_annotations_attr.parameter_annotations, (void *) annotation_array);
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->size = offset;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr;
}
R_API RBinJavaAttrInfo* r_bin_java_rtvp_annotations_attr_new (ut8* buffer, ut64 sz, ut64 buf_offset) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut32 i = 0;
RBinJavaAttrInfo *attr = NULL;
ut64 offset = 0;
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
offset += 6;
RBinJavaAnnotationsArray *annotation_array;
if(attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->type = R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_PARAMETER_ANNOTATION_ATTR;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
attr->info.rtvp_annotations_attr.num_parameters = buffer[offset];
offset += 1;
attr->info.rtvp_annotations_attr.parameter_annotations = r_list_new ();
for (i=0; i < attr->info.rtvp_annotations_attr.num_parameters; i++) {
annotation_array = r_bin_java_annotation_array_new (buffer+offset, sz-offset, buf_offset+offset);
if (annotation_array == NULL) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
if (annotation_array)
offset += annotation_array->size;
r_list_append (attr->info.rtvp_annotations_attr.parameter_annotations, (void *) annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
attr->size = offset;
}
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
return attr;
}
R_API ut64 r_bin_java_rtvp_annotations_attr_calc_size(RBinJavaAttrInfo* attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
ut64 size = 0;
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaAnnotationsArray *annotation_array;
2013-09-14 12:04:08 +00:00
if (!attr) return size;
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
size += (6+ 1);
2013-09-14 12:04:08 +00:00
r_list_foreach_safe (attr->info.rtvp_annotations_attr.parameter_annotations,
iter, iter_tmp, annotation_array) {
if (annotation_array)
size += r_bin_java_annotation_array_calc_size (
annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
return size;
}
R_API void r_bin_java_rtvp_annotations_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAnnotationsArray *annotation_array = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if (attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_PARAMETER_ANNOTATION_ATTR) {
if (attr->info.rtvp_annotations_attr.parameter_annotations) {
r_list_foreach_safe (attr->info.rtvp_annotations_attr.parameter_annotations, iter, iter_tmp, annotation_array) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (annotation_array)
r_bin_java_annotation_array_free (annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
r_list_delete (attr->info.rtvp_annotations_attr.parameter_annotations, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.rtvp_annotations_attr.parameter_annotations);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
R_API void r_bin_java_rtip_annotations_attr_free (RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAnnotationsArray *annotation_array = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATION_ATTR) {
if (attr->info.rtip_annotations_attr.parameter_annotations) {
r_list_foreach_safe (attr->info.rtip_annotations_attr.parameter_annotations, iter, iter_tmp, annotation_array) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
if (annotation_array)
r_bin_java_annotation_array_free (annotation_array);
r_list_delete (attr->info.rtip_annotations_attr.parameter_annotations, iter);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
r_list_free (attr->info.rtip_annotations_attr.parameter_annotations);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
R_API void r_bin_java_print_rtvp_annotations_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAnnotationsArray *annotation_array = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_VISIBLE_PARAMETER_ANNOTATION_ATTR) {
printf ("Runtime Visible Parameter Annotations Attribute Information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" Number of Runtime Invisible Parameters: %d\n", attr->info.rtvp_annotations_attr.num_parameters);
r_list_foreach_safe (attr->info.rtvp_annotations_attr.parameter_annotations, iter, iter_tmp, annotation_array) {
r_bin_java_print_annotation_array_summary (annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
R_API void r_bin_java_print_rtip_annotations_attr_summary(RBinJavaAttrInfo *attr) {
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
RBinJavaAnnotationsArray *annotation_array = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if(attr && attr->type == R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATION_ATTR) {
printf ("Runtime Invisible Parameter Annotations Attribute Information:\n");
printf (" Attribute Offset: 0x%08"PFMT64x"\n", attr->file_offset);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
printf (" Attribute Name Index: %d (%s)\n", attr->name_idx, attr->name);
printf (" Attribute length: %d\n", attr->length);
printf (" Number of Runtime Invisible Parameters: %d\n", attr->info.rtip_annotations_attr.num_parameters);
r_list_foreach_safe (attr->info.rtip_annotations_attr.parameter_annotations, iter, iter_tmp, annotation_array) {
r_bin_java_print_annotation_array_summary (annotation_array);
Squashed commit of the following: commit 109915c7812305b9a442d3a0febd9bc43f7104b5 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:50:08 2013 -0500 - Added author rewrite tag commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 09:37:57 2013 -0500 - Added a print statement for the number of attributes in the Code Attribute - Added a default stack frame creation commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Sep 4 08:58:55 2013 -0500 - Added the R_API prefix to all function declarations and definitions - Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.) - Code appears to parse the classfile correctly commit 5f5a28302da8c605800946df739c67a0f4f80b0d Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 23:11:00 2013 -0500 - still minor bug in the parsing code on the Type Verification or somewhere in the StackMapAttr. The right number of bytes are being read, but not all the bytes are being consumed commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:59:08 2013 -0500 - fixed some compiler warnings in class.c commit c185248aa478c6c78f6dbe14cf65ee3396287302 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 20:58:21 2013 -0500 - Propogated the change to code.c from changes from classes. commit 927542a0672f37b41b23345533bc7e6f2d1a5369 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 17:10:40 2013 -0500 Fixed some minor parsing bugs: code_attr offet was not updated correctly after reading the length of the attribute attr_buf was not initialized correctly before use commit b43a7189e9934369d1fdbd96de020edcab907430 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Tue Sep 3 16:33:36 2013 -0500 - Code compiles. Time to test. commit ea7b332d84b88baca1abc466d02b00b2b8739bca Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 23:55:44 2013 -0500 - Added in size calculations for the CP Objects. - Need to add method or field references calculations for size after compiling commit ba55375dc0e835fb46550d0063758e419ec0ed7b Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Mon Sep 2 22:56:56 2013 -0500 - Revamped all of the attribute parsing. The parsers will handle buffers rather than simply parsing straight from the file. - added a size calculator for each of the attributes, which opens up the way for creating writers for the attributes and such. commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Sat Aug 31 12:19:18 2013 -0500 - Cleaned up code and removed some of the compiler warnings. commit 4c81812f2609e4a80c7036053d122306039dd6ef Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 15:24:15 2013 -0500 - Compiler and linker errors have been resolved. - Need to work on testing commit 429ed30621d9abff1eec99ef50a35c57bbed76ad Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 13:35:39 2013 -0500 Added the RunTime Annotations and Parameter annotations. Time to start compiling and testing. commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 12:34:14 2013 -0500 Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating the method and argument structures and mapping the REF_types to strings More should be done to map the REF_types to specific resolutions. Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects commit 2c9317be5d2be0608131fb9aa10f713885c89471 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 30 00:21:34 2013 -0500 Finished drafting the code for annotation, element values, element value pairs, and annotation default attribute. TODO: RTI, RTV, and then Bootstrap attributes. commit cbee3a10c18342f6a8fb941245568de885fe5666 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:42:00 2013 -0500 Fixed the r_bin_java_element_value_new function definition. commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 15:39:28 2013 -0500 - worked out some of the initial compile errors. - worked out an outline for parsing the element_values - need to work through parsing the element value, freeing the element value, and then printing a summary. commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 29 08:21:33 2013 -0500 Most of the heavy lifting is done for attributes. Need to implement a few of the methods, and then compiling should be able to happen. Added in all attribute values to the enums, the function call tables, and then the Metas information. Need implement an ElementValue parser bleh. Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that the attribute unions are all updated. commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 22:33:43 2013 -0500 Finished adding some logic to handle the StackMapFrame types. commit 9a0965cc06021ad56d2127d279b918eef613bec9 Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Wed Aug 28 17:54:52 2013 -0500 Got some of the StackMapTable Atrribute parsing working. Right now, only the FullStackFrame will correctly parse. commit ea12bd6a8ae9969fa05cbcab622651c8b426917a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:51:33 2013 -0500 Added some debugging code while trying to figure out how to parse the StackMapTable. commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 17:00:12 2013 -0500 Code compiles. commit a7ad14050eb6184a1171620c4dcdba71b2f791aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:29:17 2013 -0500 - Added a basic Signature element - Added declarations for the new functions to handle the parsing of the StackMapTable related structures. commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Fri Aug 23 10:18:50 2013 -0500 Finished an initial coding implementation of the StackMapTable. -- Will perform testing later in the day. -- Need to look-up the Signature Attribute commit a14238eece865f4d1c5f2d6b1f482b000d10d94e Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 20:23:45 2013 -0500 StackMap stuff is wip. commit f011a5d948d31cc6197eed1bbea497a4dde362aa Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 18:44:23 2013 -0500 Made the globals match the R_* standard. Also tried to clean up naming stuff. commit 6e61e15572744c2ed722ac3df8d988cc02f1316c Author: Adam Pridgen <adam.pridgen@thecoverofnight.com> Date: Thu Aug 22 16:40:08 2013 -0500 Plugging progress into the repo. Adding fixes to handle the Java Class file appropriately. This modification is mostly a re-write of the Class File parser, and it "tries" to do a better job of creating better objects for each of the Classfile elements. Currently this code is experimental, and current TODOs are: 1) Testing 2) StackMapTable 3) LocalVariableTypeTable
2013-09-04 15:04:36 +00:00
}
}
}
R_API RBinJavaCPTypeObj *r_bin_java_find_cp_name_and_type_info(ut16 name_idx, ut16 descriptor_idx) {
RListIter *iter, *iter_tmp;
RBinJavaCPTypeObj *result= NULL, *obj = NULL;
IFDBG eprintf ("Looking for name_idx: %d and descriptor_idx: %d\n", name_idx, descriptor_idx);
r_list_foreach_safe (R_BIN_JAVA_GLOBAL_BIN->cp_list, iter, iter_tmp, obj) {
if(obj && obj->tag == R_BIN_JAVA_CP_NAMEANDTYPE) {
IFDBG eprintf ("RBinJavaCPTypeNameAndType has name_idx: %d and descriptor_idx: %d\n", obj->info.cp_name_and_type.name_idx, obj->info.cp_name_and_type.descriptor_idx);
if (obj->info.cp_name_and_type.name_idx == name_idx &&
obj->info.cp_name_and_type.descriptor_idx == descriptor_idx) {
result = obj;
break;
}
}
}
return result;
}
R_API RBinJavaCPTypeObj *r_bin_java_find_cp_ref_info_from_name_and_type (ut16 name_idx, ut16 descriptor_idx) {
RBinJavaCPTypeObj *result= NULL,
*obj = r_bin_java_find_cp_name_and_type_info (name_idx, descriptor_idx);
if(obj)
result = r_bin_java_find_cp_ref_info (obj->metas->ord);
return result;
}
R_API RBinJavaCPTypeObj *r_bin_java_find_cp_ref_info(ut16 name_and_type_idx) {
RListIter *iter, *iter_tmp;
RBinJavaCPTypeObj *result= NULL, *obj = NULL;
r_list_foreach_safe (R_BIN_JAVA_GLOBAL_BIN->cp_list, iter, iter_tmp, obj) {
if(obj == NULL) {
continue;
} else if (obj->tag == R_BIN_JAVA_CP_FIELDREF &&
obj->info.cp_field.name_and_type_idx == name_and_type_idx) {
result = obj;
break;
} else if (obj->tag == R_BIN_JAVA_CP_METHODREF &&
obj->info.cp_method.name_and_type_idx == name_and_type_idx) {
result = obj;
break;
}
}
return result;
2013-09-14 12:04:08 +00:00
}